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.
Hi,
I have a list of user logins and the applications they log into. I want to write a DAX that calculates the applicaitons that have had less than 5 User logins, 5 to 10 and 10 plus. From a use case, it's essentially telling me Applications that are rearely used. The data set looks like such.
The DAX sould show that
Office has only 1 user, even through Chad logged in 3 times
Adobe has 3 users
Citris has 1 user
In my practive i thought it would be something like
Measure = calculate( distinctcount [table name], Application name) ----- essentially counitng unique names for each application.. But i am overlooking something?
APPLICATION | USER | DATE |
OFFICE | CHAD | JAN 1 |
ADOBE | CHAD | JAN3 |
OFFICE | CHAD | FEB 9 |
OFFICE | CHAD | MAR 8 |
ADOBE | MAT | MAR 9 |
ADOBE | MAT | MAR 15 |
ADOBE | JAMES | MAR 6 |
CITRIX | JAMES | MAR 6 |
Solved! Go to Solution.
Try this:
Measure =
VAR v_table = SUMMARIZE( Table2, Table2[APPLICATION], Table2[USER])
RETURN
COUNTX( v_table, [APPLICATION])
Hi,
i'm rather new so some of the syntex throws me off. From DAX bar when i go to put VAR... i get 2 options VAR.P and VAR.S, i'm not sure which you are referring to? As well what does "RETURN" mean? I'm new to DAX so this is a leanring experience for me as well.
Measure = VAR v_table = SUMMARIZE( Table2, Table2[APPLICATION], Table2[USER]) RETURN COUNTX( v_table, [APPLICATION])
Hi,
This essentially ansewered the question i posted, but my mistake for not being clear. I've got this far which is essentially showing the unique users per applicaiton. The second part of the ask (i forgot to post), is now I wnat to have this DAX only show applications that have 5 of fewers users.
i thought i could just add ( <= 5) at the end of DAX and it woudl only show me apps with 5 or fewer unique users. But it's a True/False statement. how do i turn that back into a number?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |