Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello,
I have a report already built for which I am trying to look into performance improvement. I have a simple star schema and my fact table is originall in row storage.
Month | Market | Customer | Department | Center | Measure | Value |
M01 | DZ | CustA | SS | GGH | Sales | 100 |
M01 | DZ | CustA | SS | GGH | Returns | 200 |
M01 | DZ | CustA | SS | GGH | Volumes | 150 |
M01 | DZ | CustA | SS | GGH | Amounts | 50 |
M01 | DZ | CustA | SS | GGH | Price | 30 |
I have pivoted the columns to have all measures in columns instead of the above. What is better in terms of performance and usability? I find it counterproductive to calculate measures in such format
Sales = CALCULATE(SUM(TABLE[Value]), TABLE[Measure] = "Sales")
Month | Market | Customer | Department | Center | Sales | Returns | Volumes | Amounts | Price |
M01 | DZ | CustA | SS | GGH | 100 | 200 | 150 | 50 | 30 |
Instead in this case I can do
Sales = Sum(TABLE[Value])
Could you please advise what is better and why? Initially my dataset is 5M rows and expected to grow and doing the pivot reduces is to 250K rows but of course with the extra columns.
@Anonymous not sure what you mean? The option I talked about is keeping DAX simpler, not more complex.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous as a best practice you always want to keep your data unpivoted and there are many reasons:
- you can filter on any of the attributes (measure in your case)
- you need only one measure and use the attribute column on column well of the matrix visual, or can be used on legends in other visuals.
- ability for drill through on attribute
- custom tooltip pages will be easy to build
There are may more reasons but the above list is a good starting point.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
but doesnt this limit the ability to create calculated columns and makes DAX more complex if I am using more than one of the measures in these calculatations.
For example instead of doing SUM(TABLE[Sales]) I will need to do CALCULATE(Sum(TABLE[Value], TABLE[Measure] = "Sales")
User | Count |
---|---|
64 | |
59 | |
47 | |
33 | |
32 |
User | Count |
---|---|
84 | |
75 | |
56 | |
50 | |
44 |