Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
Question about whether it is possible to code the rounding for Power BI.
In my matrix , the values do not sum to the total amount.
I.e. The Total in the image (based on the rounding) is 2,030 instead of 2,029.
I know that the Total number is rounded correctly, but is there any way for the Total calculation to sum the rounded numbers, rather than the actuals so either the total equals 2,030, or the number that is rounded down in the rows is rounded up?
A potential solution might be toshow deciamls, but I cannot do it for this exercise.
TIA!
Solved! Go to Solution.
Hi,
According to your description, i create a table to test:
Choose a table visual and it shows:
Then create a measure:
Measure = SUMX(DISTINCT('Table'[ID]),ROUND(CALCULATE(SUM('Table'[Value]))/1000000,0))*1000000
And it shows:
Hope this helps.
Best Regards,
Giotto Zhi
Hi,
According to your description, i create a table to test:
Choose a table visual and it shows:
Then create a measure:
Measure = SUMX(DISTINCT('Table'[ID]),ROUND(CALCULATE(SUM('Table'[Value]))/1000000,0))*1000000
And it shows:
Hope this helps.
Best Regards,
Giotto Zhi
These numbers are in Million(M). So just change the format to None and check, if it is wrong. This typical round display seems like wrong. But GT again calculated so it is showing diff.
You can use format and round.
https://docs.microsoft.com/en-us/power-bi/desktop-custom-format-strings
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
User | Count |
---|---|
128 | |
108 | |
100 | |
64 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |