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 August 31st. Request your voucher.
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 ) )
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? 😊
User | Count |
---|---|
75 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
48 | |
46 |