Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
In this simplified example I am selling item A and B.
I have a fact table with sales and discount amounts.
Sales and discounts have different granularity. One sale can have several discount types. In this example types X, Y and Z.
It is all merged in to one table.
So I need to calculate salesamount for each unique SalesId to get the correct amount.
I solved it like this:
MaxSales = MAX(Tabell1[Amount]) SalesAmount = SUMX(VALUES(Tabell1[SalesId]);[MaxSales])
SalesAmount over DiscountType and Item is calculated as I want it to.
However, it is quite slow!
I am doing this in SSAS Tabular with a fact table with 500 million rows. Is there any way to do this more efficiently?
I tried splitting discounts and sales into two separate fact tables with a relation between but it worked horrible.
Help is much appreciated!
Hi @Anonymous,
Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.
Regards,
Frank
Hi Frank
Nah, there are no useless rows to clean.
I tried the FIRSTNONBLANK function instead of MAX in hope of better performance but it was slightly slower to my surprise.
Hi @Anonymous,
The measures could perform well in your scenario. As the formula is simple enough.To imporve the performance, we should optimizate the data from the data source. For example to reduce useless rows.
Regards,
Frank
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
75 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |