Forum Discussion
Percentage Total is not accurate
- 1 year ago
Hey Vizbaby ,
I'll attach a file link below. Please have a look at the DAX Code and Data Model to see the fundamental of getting the totals. Let me know in case of any queries. Thanks
Regards,
Are you wanting to have the percentage summed for the total in your percentages? If so, you will need to incorporate sumx with that so that it calculated each percentage at the row, then sums them up for the total.
one of my formula already has SUMX and it didnt work
- audreygerred1 year agoSuper User
I mean you will have to take you response rate or new response rate and do a SUMX in addition to the formula you have - that way it will do the division at the row level, then sum it for the total. The one where you have the sumx is just a distinct count - it's not doing any division to do a percentage.
Something like this (without having the sample data I can't confirm it, but something this would figure out the percent for each row then sum them)
Response_rate =VAR TotalResponses = COUNTROWS(New_MasterQuery)VAR TotalContacts = SUM(Campaign[numberofcontacts])VAR RowPercentage = DIVIDE(TotalResponses, TotalContacts, BLANK())RETURNIF(ISINSCOPE(Campaign[YourGroupingColumn]),RowPercentage,SUMX(VALUES(Campaign[YourGroupingColumn]),VAR Responses = CALCULATE(COUNTROWS(New_MasterQuery))VAR Contacts = CALCULATE(SUM(Campaign[numberofcontacts]))RETURN DIVIDE(Responses, Contacts, BLANK())))- Vizbaby1 year agoHelper I
Thank u, i just tried your formula and the answer is same as the last column i have on the snapshot i shared, 102. its not giving the right result either