Forum Discussion
SeungLee95
Microsoft Employee
1 year agoApply SUM Total to a Conditionally Formatted Column
I have the following column in my table called SR that has the following values: Null / 1 As seen on the table below, within the Matrix it'll calculate the Subtotal for each row based on the wh...
- 1 year agoTest Sum =var s = SUMX(ADDCOLUMNS('Table',"s",if([APType]="Classic",0,VALUE([TEST]))),[s])RETURN if(s=0,"N/A",FORMAT(s,"#"))
lbendlin
Super User
1 year agoYou cannot mix text and numbers in your output unless you format your numbers as text too.
SeungLee95
Microsoft Employee
1 year agoThank you lbendlin,
And in that case if the numbers were text too then the SUM wouldn't be possible anyways since it's of text format right?
Appreciate the clarification/confirmation on this.
- lbendlin1 year ago
Super User
you can still do your math to arrive at the totals but the output format of that math needs to be text.
- SeungLee951 year ago
Microsoft Employee
lbendlin - May I ask how/what you mean on how to achieve that?
I don't think there'd be any issue if the output format was changed if it was consistent (for every row/level that it's showing for)
- lbendlin1 year ago
Super User
Test Sum =var s = SUMX(ADDCOLUMNS('Table',"s",if([APType]="Classic",0,VALUE([TEST]))),[s])RETURN if(s=0,"N/A",FORMAT(s,"#"))