Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I have been running into a very strange issue with PowerBI lately and I cannot seem to be able to solve it.
I have created a line chart to show the running total % of customer that has been onboarded to a platform. The graph worked fine up until today, when it suddenly turned into extreme numbers. The strange thing is that it is only the % formula that is not working as it should, while the running total count works fine. Furthermore, when I load the same measures into a card, all measures, including the % running total, works perfectly fine and shows the correct numbers and percentages.
I have written the DAX for the % of total as follows:
%Sub_Tracker running total =
divide(
[Sub_Tracker running total],
COUNTA(D_Customers[Customer code]))
With the running total being calculated as:
Sub_Tracker running total =
calculate(
COUNTA(F_Sub_Tracker[Customer Number]),
F_Sub_Tracker[Tracker]="Onboarded",
filter(
ALLSELECTED(F_Sub_Tracker),
'F_Sub_Tracker'[Tracker change date] <= max(D_Dates[Date])))
This graph worked well up until today, when it suddenly shows huge percentage numbers as you can see below:
The percentage for 85 should be out of 215, so 39.53%
I have no idea what happened. Has anyone experienced this before?
Thank you in advance!
Best,
DNKL
Solved! Go to Solution.
Hi @DNKL ,
It seems the formula which calculate the total number of customers(COUNTA(D_Customers[Customer code])) can't return the correct value, please try to update the formula of measure "%Sub_Tracker running total " as below:
%Sub_Tracker running total = DIVIDE ( [Sub_Tracker running total], COUNTX (ALL( 'D_Customers'), D_Customers[Customer code] ) ) |
If the above method still not working, please provide the related tables structure and some sample data(exclude sensitive data). Thank you.
Best Regards
Rena
Hi @DNKL ,
It seems the formula which calculate the total number of customers(COUNTA(D_Customers[Customer code])) can't return the correct value, please try to update the formula of measure "%Sub_Tracker running total " as below:
%Sub_Tracker running total = DIVIDE ( [Sub_Tracker running total], COUNTX (ALL( 'D_Customers'), D_Customers[Customer code] ) ) |
If the above method still not working, please provide the related tables structure and some sample data(exclude sensitive data). Thank you.
Best Regards
Rena
Hi @v-yiruan-msft ,
Thank you for your reply!
I tried out the DAX solution you suggested. With making a slight adjustment (using ALLSELECTED() instead of ALL()), the solution you provided works! Thank you very much for your help! 🙂
Best,
DNKL
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |