Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I am creating a Benford's analysis table based on Journal Entries. I have taken the absolute value for each Amount in the ledger and pulled the first digit from it (named the column First Digit). That part works fine, my calculations start to bog down when I do my percentage calculation. Percentage = Count(First digit)/ CountRow(Table). I put into a bar graph as the value and First Digit as the axis. It looks like a Benford's table but the numbers are off. For instance, the 1 digit has a value of about 1043 the 2 digit is around 800 and so on and so forth. I pulled the count of First Digit onto a table visual and manually divided the row total by the grand total and it is giving the expected correct result.
An ideas why the percentage calculation in Power BI is not working aas expected?
Solved! Go to Solution.
Hi @jbrijalba
It works on my side.
Create measures:
count = COUNT(Sheet8[number]) count_all = CALCULATE(COUNTROWS(Sheet8),ALL(Sheet8[number])) per = [count]/[count_all]
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jbrijalba
It works on my side.
Create measures:
count = COUNT(Sheet8[number]) count_all = CALCULATE(COUNTROWS(Sheet8),ALL(Sheet8[number])) per = [count]/[count_all]
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I forgot to use the calculate(all) function. Worked for me, I just had to use:
Calulate(Countrows(Table), Filter(All(Table), FirstDigit <>0)).
Thank you @v-juanli-msft