Forum Discussion
Count a Measure in a ABC Classification
Hi people!
I have the following table with 10 products for 2 stores and I have a [ABC] measure (I filter by date, store, product):
| STORE | PRODUCT | [ABC] |
| Store 1 | 1 | A |
| Store 2 | 2 | B |
| Store 1 | 3 | A |
| Store 2 | 4 | A |
| Store 1 | 5 | C |
| Store 1 | 6 | A |
| Store 2 | 7 | A |
| Store 1 | 8 | C |
| Store 2 | 9 | C |
| Store 1 | 10 | B |
How can I count by store by the measure? The expected result:
| STORE | A | B | C |
| Store 1 | 3 | 1 | 2 |
| Store 2 | 2 | 1 | 1 |
I think the way is to create a CALCULATETABLE, but I didn't get the results yet...
Hi, Andregewehr ;
Create measure as follow:
A = CALCULATE(COUNT('Table'[[ABC]]]),'Table'[[ABC]]]="A")B = CALCULATE(COUNT('Table'[[ABC]]]),'Table'[[ABC]]]="B")C = CALCULATE(COUNT('Table'[[ABC]]]),'Table'[[ABC]]]="C")The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- AndregewehrHelper I
Here are the pictures, the table misconfigured
Expected results:
- Ashish_MathurSuper User
Hi,
Share the link from where i can download your PBI file. Also, elaborate on the criteria for classifying products in A,B and C categories.
- v-yalanwu-msftCommunity Support
Hi, Andregewehr ;
Create measure as follow:
A = CALCULATE(COUNT('Table'[[ABC]]]),'Table'[[ABC]]]="A")B = CALCULATE(COUNT('Table'[[ABC]]]),'Table'[[ABC]]]="B")C = CALCULATE(COUNT('Table'[[ABC]]]),'Table'[[ABC]]]="C")The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.