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.
Hello
I have a report which needs total for one amount column.when I select sum by right clicking on the column name,its giving me wrong result.
Sum for this is $3109.01
But im getting this
Hi @PavaniD
Thanks for the reply from @3CloudThomas , please allow me to provide another insight:
First of all, I create a set of sample:
You can use the if() and Hasonevalue() function to calculate the total separately:
MEASURE =
IF (
HASONEVALUE ( 'Table'[ID] ),
SUM ( 'Table'[Value] ),
IF (
SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Value] ) > 0,
SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Value] ),
0
)
)
The result is as follow:
When the sum of the value less than 0 then return 0.
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Its still the same.sum of current amount is the measure i used that you suggested.
Hi @PavaniD
Could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I tried the above measure.But Im getting wrong result.
Here ($1,126.98) is actually "-$1,126.98" negative amount.So the ressult must be 0.
Do not right-click and select sum.
Create an explicit measure Sum Current Amt = SUM(<tablename'>Current Amt')
Please this measure, Sum Curent Amt, in the table with the attributes to sum.
You might even want to turn Auto Sum off on the columns in the model.
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 |
---|---|
109 | |
106 | |
88 | |
75 | |
66 |
User | Count |
---|---|
125 | |
114 | |
98 | |
81 | |
73 |