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 September 15. Request your voucher.
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
Solved! Go to Solution.
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
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
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
User | Count |
---|---|
69 | |
64 | |
62 | |
55 | |
28 |
User | Count |
---|---|
203 | |
82 | |
65 | |
48 | |
38 |