Forum Discussion
Automatically store measures in a table after a refresh on a daily basis.
- 3 years ago
If you can provide examples with some sample data , it will help us to answer. Any aggregations to present persistently, I prefer doing in power query.
Since you want to do DAX, it is definitely possible. Try looking into these and see if that helps. Summarize, UNION, SELECTCOLUMNS...
DATATABLE: try checking this article
https://www.sqlbi.com/articles/create-static-tables-in-dax-using-the-datatable-function/
Random example to help you understand and say it can be done.
I am creating a table using UNION of two tables. Each table has to be same number of columns and data types.
Table = UNION ( CALCULATETABLE( SUMMARIZE ( Sales, 'Product'[Category], 'Date'[YYYY-MM], "Measure", "Count", "Count", 'Sales Order'[Orders count] ) , Year('Date'[Date]) = 2020 ) , CALCULATETABLE( SUMMARIZE ( Sales, 'Product'[Category], 'Date'[YYYY-MM], "Measure", "Sales", "Sales", [Total Sales] ) , Year('Date'[Date]) = 2020 ) )Data view tab:
I hope this gives some direction. If this is not what you need, Sorry, please could you provide more info.
Typically, to store persistently, you use power query. Create the same functionality of snaphsot (table) with your needs in Power Query. When you refresh, power query will also refresh this table. This is better in performance as it is written to storage.
If you want to do the same in DAX, create a table using summarize.