The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Given a simple geographic hierarchy like Region>Country>Metro, I need to calculate a SUM at the Region grain that responds to a filter passed from a slicer at the Metro grain.
In a matrix I can create a measure [Regional Sales] = CALCULATE ( SUM ('BFT'[Sales],ALLEXCEPT('BFT','BFT'[Region])) and as long as Region is on the Rows before Metro it will display the total Region Sales for each Metro.
But what I want is a measure that will display the correct value for Region Sales if only Metro is on the matrix, or if the measure is put on a Card and a Metro is chosen in a slicer.
My real world case is more complex but if I can figure out this simple example I think I'll be ok. I guess you can't do attachments anymore so here's an image I hope clarifies what I'm looking for:
calculate([$ sales],allselected(BFT))
User | Count |
---|---|
15 | |
13 | |
9 | |
6 | |
6 |
User | Count |
---|---|
27 | |
19 | |
13 | |
9 | |
5 |