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.
Hi, everyone!
I'm experiencing a bit of a hiccup right now.
I have a card that displays the name of the country chosen in a filter. My filter contains Region > Cluster > Country hierarchy.
For example, I choose "Thailand" > the card will display "Thailand". I did this by making a measure [CountryName]
[CountryName] = DISTINCT('Filter Table - Country'[Country])
Filter Table - Country
Country | Cluster | Region |
Thailand | TML | Asia |
Vietnam | MSV | Asia |
Myanmar | TML | Asia |
Lao | TML | Asia |
Singapore | MSV | Asia |
Philippines | PH | Asia |
Now, I want to be able to make a measure that shows the cluster when ALL of the countries were chosen under that. For example, I choose Thailand, Myanmar, and Lao in the filter > I want the card to show "TML".
Would anyone know how to make this possible? Will really help me a lot.
Thanks!
@ChristianDLS56 , You need one copy of Country to independent means do not join fact
Then create measure like
= var _clu = summarize(allselected(IndCountry), IndCountry[cluster])
return
calculate(count(Table[Value]), filter(Country, Country[cluster] in _clu ) )
Need of an Independent Table in Power BI - Exclude: https://youtu.be/lOEW-YUrAbE
Hi @amitchandak
Appreciate your suggestion. Sadly, it doesn't work yet.
I tried doing your suggestion and ended up getting numbers - I think because of the COUNT in the measure. I figured it's because it's returning the number of countries chosen in the filter, when it's supposed to be showing either the Country or the Cluster...
= var _clu = summarize(allselected(IndCountry), IndCountry[cluster])
return
calculate(count(Table[Value]), filter(Country, Country[cluster] in _clu ) )
@ChristianDLS56 , check if this file can help
Hi @amitchandak .
Wow, thanks for going out of your way to offer solution.
I checked the file you attached and see that you used CONCATENATEX...
Not exactly what I was hoping for.
I would want to be able to do this:
If I choose Thailand on the filter > I want the measure to show "Thailand"
If I choose Mynamar on the filter > I want the measure to show "Myanmar"
If I choose Thailand, Myanmar, AND Lao on the filter > I want the measure to show "TML" which is their Cluster.
Note that I only want the name of the cluster to show when I choose ALL of the countries under that cluster. So for example I choose Vietnam AND Singapore, I would want the measure to show "MSV".
Is that possible? 😊
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 |
---|---|
100 | |
99 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
108 | |
104 | |
83 | |
73 |