Forum Discussion
Measure to Segment User Activity
I created a measure that totals up 'Logins' per clientID a month.
But now I want to create another measure that assigns a 'level of activity' based on the # of monthly logins
Low = less than 5
Medium = between 5 - 10
HIgh = 10+
I believe I need to create it using a switch but I'm not sure how to set it up.
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,
7 Replies
- rsbinCommunity Champion
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,
- bigfunHelper I
This is perfect... now I just need to figure out how to free up or not use as much memory processing it.. haha
- bigfunHelper 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.