Forum Discussion
dax
this is count cal when -ve retailing is included.
this is the formula for the above visual. It calculates distinct count of customers where sept=sept+aug+july, aug= aug+july+june and so on.
in excel pivot it count is different it is 24225 for sept and that is the count i want.
https://drive.google.com/drive/folders/1i8pY-97Y7r7alnWXvQeXEjqarzGAnsdS?usp=drive_link data link.
Ahmedx
17 Replies
- Uzi2019Community Champion
HI Anonymous
Please do the following steps:
Create new measure:Cust>0 = CALCULATE(COUNTROWS(Customer),FILTER(Customer,Customer[Retailing]>0))Create new measureCummuative =Var N= MAX(Customer[Month])-2Var A=CALCULATE(Customer[Cust>0],'Customer'[Month]>=N && 'Customer'[Month]<=MAX('Customer'[Month]))Return AI hope I answered your question.
- AnonymousNot applicable
works 100% just 1 condition that i need is sum(retailing) and then distinctcount of customers. i got this result earlier also it is not wrong just after sum of retailing is applied then the count comes out to be different. ALso im not able to add this "sum of retailing" in the above measure
- Uzi2019Community Champion
Hi Anonymous
Can you give me example by smapled data how you want Sum (retailing) to be added??
On which condition ?
or is it different measure or what?
Initially you want the count(cust) whose retailing >0 right. then you want 3 months count together.
Please mention the condition properly
- AhmedxSuper User
Explain how you got this value (24225) in Excel
- AnonymousNot applicable
that is the distinct count of all months and in the provided dataset.the data is only of 7,8,9th month so total distinct count was 24225. and this should be in the month value 9
- AhmedxSuper User
can you share file with pivot table
- AnonymousNot applicable
=COUNTIF(E10:E24590,">0")