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

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.

Reply
ShashankKalluri
Frequent Visitor

Single Measure for multiple filters

Hi,

 

There are two tables (or more) in which I have 'Users' column for each dimension, and I am looking for a single measure which would give me the count of users, when I select the filters. 

 

 

Consider the below scenario where I have multiple dimesions (like City, Country, Laptop Name etc) 

Capture.PNG

 

 

 

 

 

 

My client wants the dimensions as filters on the dashboard, so that he can slice and dice the count of users, but only wants a single card where he can see the count.

 

For eg: If the client selects say UK from the "Region" - it should display count of users for UK, If the selection is Dell from "Laptop Name" then it should show the count of users for that correspondingly. 

 

Understand there is no common column between both the tables. Just curious if this can be pulled off. 

 

Thanks for your help in advance. 

 

Regards,

Shashank

 

 

 

 

 

 

 

 

 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

You can do something like this: 

MEASURE = 

VAR1 = Sum(Table1[Users])

VAR2 = Sum(Table2[Users])

RETURN

SWITCH(
               TRUE;
ISFILTERED(Table1); VAR1;
ISFILTERED(Table2); VAR2
)

This should work if there aren't other complications in the data

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@ShashankKalluri 

Create a common user table

User =distinct(union(all(table1[user]),all(table2[user])))

 

Join it both the tables. Or you can count distinct user from it

Anonymous
Not applicable

You can do something like this: 

MEASURE = 

VAR1 = Sum(Table1[Users])

VAR2 = Sum(Table2[Users])

RETURN

SWITCH(
               TRUE;
ISFILTERED(Table1); VAR1;
ISFILTERED(Table2); VAR2
)

This should work if there aren't other complications in the data

It Workeed. Thank you so much @Anonymous

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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