Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ChristianDLS56
Frequent Visitor

Measure that depends on chosen values on filter

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

CountryClusterRegion
ThailandTMLAsia
VietnamMSVAsia
MyanmarTMLAsia
LaoTMLAsia
SingaporeMSVAsia
PhilippinesPHAsia

 

 

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!

4 REPLIES 4
amitchandak
Super User
Super User

@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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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? 😊

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.