Forum Discussion
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)
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
- Anonymous6 years ago
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
3 Replies
- AnonymousNot 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- ShashankKalluriFrequent Visitor
It Workeed. Thank you so much Anonymous
- amitchandakSuper User
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