Forum Discussion
Total Distinct count is not matching with export data after mapping.
Dear Team Member,
I have an issue of Total Distint Count showing that it's not matching when mapping with export data. I had applied 02 measures as the following below.
1. Firstly, Dist_Count Active Store = DISTINCTCOUNT('Actual Sales'[Customer Code])
2. And then No. Active Customer = CALCULATE([Dist_Count Active Store],'Actual Sales'[BillingType]="ZF2",'Actual Sales'[Price Type]="SALE")
Total showing in table chart is 1207 but export data and count is 1217.
Please kindly assist to check the screenshot, measure and advise.
4 Replies
- amitchandak
Super User
ADSL , Power bi recalculate grand total, means distinct count is calculated at total level and not a sum of rows
If you want to make it sum, try like
Sumx(values('Actual Sales'[Sales Rep code]),CALCULATE([Dist_Count Active Store],'Actual Sales'[BillingType]="ZF2",'Actual Sales'[Price Type]="SALE") )
- Jihwan_Kim
Super User
Hi,
I am not sure how your dataset looks like, but please try to write the below measure and replace the current one with the below, and please check whether it suits your requirement.
New measure: = SUMX ( VALUES ( 'TableName'[Sales Rep Code] ), [No. Active Customer] )- ADSL
Post Prodigy
Dear Jihwan_Kim ,
Thank you for your helpful feedback!
When trying your measure then getting error as the screenshot. Please kindly check it.
=> I would like to inform that it's fixed after I am trying to combine sales rep & customer code column together and follow the exiting measure with this new column. Thanks a lot
- ADSL
Post Prodigy
Dear amitchandak,
Thank you for your helpful feedback!
After trying your measure, I am getting issue as the screenshot. Please kindly check it.
=> Just inform when I combine the sales rep code column with customer code and follow my existing measure then It's working now as per expectation.