Forum Discussion
Counting how many people used an application?
- Anonymous6 years agoWhenever you are declaring variable in dax you have to type keyword "return" and after return whatever is there is the output of your statement.
Measure=
Var a=Calculate(distinctcount(table[user]),allexcept(table,table[application])
Return
If(a<=5,a,blank())
Incase the other measure is working incase then just change var a= that summerize one statement.
Thanks
Pravin
If it resolves your problem mark it as a solution and give Kudos.
Try this:
Measure =
VAR v_table = SUMMARIZE( Table2, Table2[APPLICATION], Table2[USER])
RETURN
COUNTX( v_table, [APPLICATION])- Anonymous6 years agoNot applicableTry this
Calculate(distinctcount(table[user]),allexcept(table,table[application])
Thanks,
Pravin
If it resolves your problem mark it as a solution and give Kudos.- sharpedogs6 years ago
Advocate II
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?
- sharpedogs6 years ago
Advocate II
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])
- Anonymous6 years agoNot applicableWhenever you are declaring variable in dax you have to type keyword "return" and after return whatever is there is the output of your statement.
Measure=
Var a=Calculate(distinctcount(table[user]),allexcept(table,table[application])
Return
If(a<=5,a,blank())
Incase the other measure is working incase then just change var a= that summerize one statement.
Thanks
Pravin
If it resolves your problem mark it as a solution and give Kudos.