Forum Discussion
Filter on measure changes original values
- 3 years ago
Because of the row context in the visual. For that row in the visual, the distinctcount of that Customer will be 1 itself.
Hi Ashish,
thank you very much for taking the time to reply.
In your .pbix you have defined the top customers. I already have a measure that does this called Rank. In my pbix example I am trying to calculate the total number of Top Ranked Customers /2 then pass this result to the measure (Flag Qty).
Basically in my .pbix I need to:
Replace
Total Customers to View = 6
With
Total Customers to View = (total customers /2)
This measure will need to work with ‘Flag Qty’ which I can then use to filter the result. I need to use the existing Rank measure as there is no BOTTOMN in DAX.
many thanks again,
Connor
Hi,
If you want the Bottom n customers, then try this
Measure = calculate([Total],topn([Top qty]/2,all('Name'[Merchant]),[Total],ASC),values('Name'[Merchant]))