Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
The previous post [here] didn't get answers, so I found out how to break it down to tackle the first steps first.
I need to aggregate a measure by category, in the sense that the Quick Measures work.
Target Share = MAXX(
KEEPFILTERS(VALUES(Cities[city_key])),
CALCULATE([Market Share]) )
And I have defined [Market Share] to be calculated for each city, among other geographic hierarchichal levels.
While this does get a city-wise calculation, when I'm showing it in a Table, I'm not getting the maximum amongst the different cities... In fact I get the same measure than the regular [Market Share] as shown below...
How can I get this measure to show the maximum?
In addition, I'd like to divide the maximum per group (also shown in the picture).
I thought I was getting there by changing the filter conditions as follows:
Target Share = MAXX(
CALCULATETABLE( VALUES(Cities[city_key]),
ALLEXCEPT(Cities, Cities[group])),
[Market Share]
)
But then again, I can't get the maximum from all tables before hand, so I'd need to figure that out first.
Thank you for your help.
Your estado and grupo columns are also filtering the data. In any case, your VALUES() is only making a table of just that city (I don't think you need the KEEPFILTERS()). So you are getting the same result as [Market Share]. Please try this expression instead. You can adapt it by adding/removing columns from the ALLSELECTED to get your other measures.
Target Share = MAXX(ALLSELECTED(Cities[ciudad], Cities[estado], Cities[grupo]), [Market Share])
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.