Forum Discussion
ianwuk
Helper III
8 years agoHow to sum values horizontally in a table?
Hello. I have sales data for number of products sold per staff member that looks like this, with the totals being calculated vertically, how can it be calculated horizontally as well? My data...
- 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)
Ashish_Mathur
Super User
8 years agoHi,
Your data is not well structures. It should ideally be a 3 column dataset - Name, Item and Value. The item column should have Gloves, Scarfs and Hats. To do so, in the Query Editor window, right click on the first column and select "Unpivot other columns". Click on Close and Load. Now build your visual.