Forum Discussion
dax
oh my bad you can include everything
Measure 2 =
var a= MAX('PSR'[Month])-2
var b =CALCULATE(DISTINCTCOUNT('PSR'[Customer_Code]),'PSR'[Month]>=a && 'PSR'[Month]<=MAX('PSR'[Month])&& 'PSR'[sale]>0)
return
b- Anonymous2 years agoNot applicable
this measure is fine but not 100% correct. after taking sum of retailing then the distinct count should be applied.
- Anonymous2 years agoNot applicable
Ahmedx ?
- Ahmedx2 years agoSuper User
I don’t understand, please explain what else is needed
- Anonymous2 years agoNot applicable
the retailing value are + and - both .......in this case if some retailing is done lets say 20 then naturally the count should be 1 but the product he recieved were damaged so he returned those products i.e -20. technically that customer had never ordered. +20-20= 0 . so it should not be counted. but in this case in power bi when we exclude -ve retailing at that time only -20 is excluded and +20 remains there. so still that customers count is considered. and in excel that is not the case. In excel it is taking the sum of retailing and then the count is being taken. i want the excel value.