Forum Discussion
Problems with Measure: Categorize outlets based on count of their sent messages
Hi all,
I am currently trying to categorise outlets based on their sent messages in a calendar week.
I created the following measure:
When I now create a table with all OutletId's and their OutletActivity it does exactly what it should.
I can select a calendar week and for each week it shows me the category of each outlet:
I now want to get the number of High active / Medium active and Low active Outlets.
Example:
| High active Outlets | 1000 |
| Medium active Outlets | 999 |
| Low active Outlets | 100 |
When I now change OutletId to Count or better Count(distinct) it does not show the threee categories anymore.
It only shows High active Outlets.
Can anybody support me with my problem?
Thanks in advance!
2 Replies
- v-zhangti
Community Support
Hi, Anonymous
You can try the following methods.
Measure:Count Measure = Var _table=SUMMARIZE(ALL('Table'),'Table'[OutletId],"Status",[OutletActivity]) Var _a = [OutletActivity] return COUNTX(FILTER(_table,[Status]=_a),[Status])If you want three rows, High active/Medium active and Low active outlets, you have to be columns.
New Table:
Table 2 = SUMMARIZE('Table',[OutletId],"Status",[OutletActivity],"Count",[Count Measure])Result:
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi _Charlotte,
I guess your answer does not help me in what I want to achieve.
My aim is to get the number of high active outlets, medium active outlets or low active outlets.High active outlets: Outlets which sent more (or equal) than 100 messages (>=100)
Medium active outlets: Outlets which sent less than 100 but more than 30 messages (<100 and >30)
Low active outlets: Outlets which sent less (or equal) than 30 messages (<=30)
I have a fact table for all messages and I have an outlet dimension where all outlets are stored.
Thanks a lot for your help!
Best,
Luisa