Forum Discussion
Anonymous
3 years agoNot applicable
DAX - Count by group
Hi All, In my report, there is a Slicer of "Shop" I am trying to write a DAX to count how many customers with these critirias: 1.) The customers's first transaction is from the Shop Slicer (Ass...
Anonymous
3 years agoNot applicable
Hi Anonymous ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _select=SELECTEDVALUE('Table'[Shop])
return
COUNTX(FILTER(ALL('Table'),
'Table'[ID]<=2 && 'Table'[Shop]=_select),[Shop])
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
3 years agoNot applicable
Anonymous thanks but sorry that I am not so clear.
I am hoping to count the customer who
1.) first transaction in shop A (which is depended on the slicer)
2.) for those whose first transaction in shop A, how many of them later on, have transaction in shop B (Shop B is required)
Thanks in advance