Forum Discussion
Rounding question
- 1 year ago
Okay i missed that the round was within the iterator of the sumx function. Can you move the round function out of the expression like so:
test =
ROUND (
SUMX (
Table,
VAR r1 = IF ( Table[Column] = "Tax", Table[Column2], 0 ) RETURN rt1
),
1
)Or do you actually need to round the number before summing them together?
More info on Variables in DAX: https://www.sqlbi.com/articles/variables-in-dax/
If this post helped, please mark my post as a solution
Regards,
Thomas Hanson
Individual Contributor
- 1 year ago
As ROUND is within SUMX it is evaluted for each row in HoldingsReportData before all eveluated rows summed up together in the total row. If you want the total to rounded, wrap it around the SUMX expression instead.
Thank you for your response. Inside the Ribbon and the Visual, I have set the decimal to 1 and Auto respectiviely but the behavior continues. Per your suggestion to put the measure inside a Card visual. The output below shows the output without the rounding:
With the rounding, the output is as follows:
Okay i missed that the round was within the iterator of the sumx function. Can you move the round function out of the expression like so:
test =
ROUND (
SUMX (
Table,
VAR r1 = IF ( Table[Column] = "Tax", Table[Column2], 0 ) RETURN rt1
),
1
)
Or do you actually need to round the number before summing them together?
More info on Variables in DAX: https://www.sqlbi.com/articles/variables-in-dax/
If this post helped, please mark my post as a solution
Regards,
Thomas Hanson
Individual Contributor