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.
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
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |