Forum Discussion
How to sum values horizontally in a table?
- Anonymous8 years ago
You can go to Format pane of your table, and there should be an option for grand total that you can turn it off to remove Total. As for displays 0, you can write the following:
Sales Total =
VAR temp = SUMX(Sales, Sales[Hat] + Sales[Scarf] + Sales[Gloves])
RETURN IF(temp = BLANK(), 0, temp)
Hello Anonymous.
Your measure worked great, thank you!
I used it to make this table:
| Month | Hat | Scarf | Gloves | SalesTotal |
| March | 1 | 6 | 4 | 11 |
| Total | 1 | 6 | 4 | 11 |
In the above, SalesTotal is your measure, and works great, but Total is calculated by Power Bi - how do I remove it?
Also, how can SalesTotal be edited so that if some products have no sales, it displays 0 instead of being blank?
Many thanks.
You can go to Format pane of your table, and there should be an option for grand total that you can turn it off to remove Total. As for displays 0, you can write the following:
Sales Total =
VAR temp = SUMX(Sales, Sales[Hat] + Sales[Scarf] + Sales[Gloves])
RETURN IF(temp = BLANK(), 0, temp)