Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I have 3 columns that I would like to sum their unique values and have a total number of users, for this example, the output should be 9, as Tom is repeated.
I tried to use a formula for a similar example situation but it gave me fewer numbers for some reason.
This is the formula that I tried:
Count Total Users= COUNTROWS(SUMMARIZE(Table[ User Level 1],[ User Level 2]Table[ User Level 3]))
Thanks for your help!
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
Total users count: =
VAR newtable =
FILTER (
SUMMARIZE (
UNION (
VALUES ( Data[UserLevel1] ),
VALUES ( Data[UserLevel2] ),
VALUES ( Data[UserLevel3] )
),
Data[UserLevel1]
),
Data[UserLevel1] <> BLANK ()
)
RETURN
COUNTROWS ( newtable )
Hi,
Please check the below picture and the attached pbix file.
Total users count: =
VAR newtable =
FILTER (
SUMMARIZE (
UNION (
VALUES ( Data[UserLevel1] ),
VALUES ( Data[UserLevel2] ),
VALUES ( Data[UserLevel3] )
),
Data[UserLevel1]
),
Data[UserLevel1] <> BLANK ()
)
RETURN
COUNTROWS ( newtable )
Hi:
If you don't mind using transform data and higlight the first column and unpivot others you get:
Then this measure will result in nine for the count.
Hi, Thanks for your help, it works fine that way is a bit of a work around with tables, so I`ll go for the DAX formula
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
8 | |
6 |