Fabric Data Warehouse: Save as Table and Analyze Result Functionalities

In this article, we will be looking at Microsoft Fabric Data Warehouse Save as Table and Analyze Result functionalities that offer several benefits to users and analyst.

Benefits of Save as Table and Visualize Result

Save as Table functionality allows users to save query results into a table. Users can select the warehouse in which they would like to save results, select a schema that they have access to create tables, and provide a table name to load results into the table using the CREATE TABLE AS SELECT statement. Once the table is successfully created, it will appear in the Warehouse Explorer.

Analyze Result functionality enables users to visualize query results and gain insights into their data. Users can select the query and then select the Analyze Result button to open the query results in a new window. The Analyze Result window provides several options for visualizing the data, including charts, tables, and maps. Users can also customize the visualization by selecting different chart types, colors, and labels.

Demo on Visualize Result

To use the Analyze Result functionality, We execute this query:

SELECT d.FiscalPeriod, d.Month, FORMAT(SUM(f.TaxAmount),'c','en-GB') as SumTaxAmount
FROM dimOrderDate d
INNER JOIN fTransaction f ON d.OrderDateKey = f.OrderDateKey
WHERE FiscalYear = 2015 OR FiscalYear = 2016
GROUP BY d.FiscalPeriod, d.Month
ORDER BY SUM(f.TaxAmount) DESC
  • Run the query in the Fabric Data Warehouse: In the screenshot below, we have execute the query.
    Run Query in fabric data warehouse
  • Select the query in the query results window.
  • In the Visualize results window, click Continue.
    Result
  • Create the report using the visualizations. In this example, we used the Table visual to create FiscalPeriod by SumTaxAmount and we increase the Value font size.
    Visualize Result

At the bottom right corner of the window, select Save As.

  • In the Save your report window, provide the name for the report and select destination workspace as seen below
    Save report
  • Click Save

The report is saved.

Saved report

 

Demo on Save As Table

To use the Save as Table functionality, it is required to delete the FORMAT function wrapped around the SUM function and the ORDER BY. This is because the FORMAT function will return nvarchar (4000) error and the ORDER BY will return incorrect syntax error. Therefore, to save as Table,

Select the query and click on Run:

SELECT d.FiscalPeriod, d.Month, SUM(f.TaxAmount) as SumTaxAmount
FROM dimOrderDate d
INNER JOIN fTransaction f ON d.OrderDateKey = f.OrderDateKey
WHERE FiscalYear = 2015 OR FiscalYear = 2016
GROUP BY d.FiscalPeriod, d.Month
ORDER BY SUM(f.TaxAmount) DESC

Click on Save as Table and provide name for the Table. In this example, we named the Table as TaxAmountByTotalSales

Click OK. 

We can then check the new Table in the Warehouse Explorer 

. In the screenshot below, we can see the TaxAmountByTotalSales

In the A to Z workspace, we can see the SQL query visualization report

Conclusion

By using the two functionalities, users can easily save query results for future use and gain insights into their data through visualizations.


Similar Articles