Forum Discussion
bigfun
3 years agoHelper I
Measure to Segment User Activity
I created a measure that totals up 'Logins' per clientID a month. Monthly Logins = calculate(DISTINCTCOUNT(ui_PageActionView[UnqSession]), DATESINPERIOD('Calendar'[Date],max('Calendar'[Date]),-1...
- 3 years ago
bigfun ,
Yes, SWITCH Statement is how I would approach this as well:
LevelofActivity = SWITCH( TRUE(), [Monthly Logins] > 10, "High", [Monthly Logins] >=5, "Medium", "Low" )The last line, is your "else" condition. You can specify your third condition <5 if you want to make it clearer to yourself or others.
Hope this helps.
Regards,
bigfun
3 years agoHelper I
So i am not sure why... But all the 'Activity Status' are showing low... I'm not sure why it isn't evaluating the number and assigning the status correctly.
- rsbin3 years agoCommunity Champion
bigfun ,
The LevelofActivity is written as a Measure not a Calculated Column.
If you drag this Measure into your Visual in your Original Post, it should work as intended.
As a Calculated Column, it is evaluating each Row to 1, hence "low". I believe this is what's happening.