Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have data of few scores for different items for different staff id. we need to compare month-wise individual score and get the count of staff who increased/decreased/same in their scores.
For this, I have created 2 alternate states Group1 and Group2 for different month selections and when I have to compare the individual scores, I am getting the total sum of all the scores of that month selection, used the below expression -
If(sum({<Date={'$(=Date(Max({GROUP1}Date),'YYYY-MM-DD'))'}>}Score)<
sum({<Date={'$(=Date(Max({GROUP2}Date),'YYYY-MM-DD'))'}>}Score),Count([Staff ID]))
Tried with only/count/distinct but no luck.
If score of selection 1 month < score of selection month 2 - Increase
If score of selection 1 month > score of selection month 2 - Decrease
If both scores are equal - Same.
All these status need to be represented in a stacked bar chart with different colour codes.
Attaching images for your reference.
Any leads is much appreciated !!! TIA !!
I don't understand what you are trying to represent in your bar chart and what is your issue exactly.
Hi @vincent_ardiet_ ,
Apologies!! Ignore the values in the bar chart.
I need to represent the count of staff id for those who are in increase/decrease/same states with different colour codes in the bar chart.
As per the above data ,comparing scores of selection 1 and 2, count of staff id should be like -
5 in same (grey colour), 4 increase (Green colour) and 1 decrease(Red colour).
Hope this is clear !! Thanks!!
You can create 3 measures, one for each status for example.
Yes, that is where I am facing the issue. I have used the below expression for Increase state (if individual score of selection1 is < individual score of selection 2) as-
If(sum({<Date={'$(=Date(Max({GROUP1}Date),'YYYY-MM-DD'))'}>}Score)<
sum({<Date={'$(=Date(Max({GROUP2}Date),'YYYY-MM-DD'))'}>}Score)
Group1 and Group2 are month selections , in that I need the month-end data, so have taken max(date).
Now this expression is summing up all the scores and comparing but I need individual score comparison.
Tried with only, count, but it didn't work.
Sorry I don't follow.
Could you illustrate with an example what you are trying to achieve?