Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a dataset where I am calculating top 3 Category and count for these for 7 days.
Once i have labels for top 3 categories, I want to see count of these categories on a line chart as 3 lines.
Here while plotting this on line chart I found that when adding a dimension day the category is getting changed.
Dimension: Date
Line: Category
Measure:
Sum({$<Year=, Month=, Day=,category={'Voice'},
Date={">=$(=date((max(Date)-6)))<=$(=date(max(Date)))"}>}
occurrences)
If you see here in the above table, I have top 3 categories based on the count from the measure cals.
But when i am adding the line where i have added a dimension as Date this is calculating top 3 for each day for Top 3.
Expectation:
Show data/count for only those 3 categories from the top 3 categories only.
please suggest.
You can try with this expression (instead of using the top 3 mechanism):
Sum({$<Year=, Month=, Day=,category={'Voice'},
Date={">=$(=date((max(Date)-6)))<=$(=date(max(Date)))"},
ActivityCode={[=Rank(Sum({$<Year=, Month=, Day=,category={'Voice'},
Date={">=$(=date((max(Date)-6)))<=$(=date(max(Date)))"}>} occurrences))<=3]}
>}
occurrences)
You can try with this expression (instead of using the top 3 mechanism):
Sum({$<Year=, Month=, Day=,category={'Voice'},
Date={">=$(=date((max(Date)-6)))<=$(=date(max(Date)))"},
ActivityCode={[=Rank(Sum({$<Year=, Month=, Day=,category={'Voice'},
Date={">=$(=date((max(Date)-6)))<=$(=date(max(Date)))"}>} occurrences))<=3]}
>}
occurrences)
@vincent_ardiet_ Thanks a lot for your reply. It worked perfectly for my scenario. 🙂