I have a table with 3 columns, Item, Unit of Measure, and Quantity.
I want to add a measure to sum the quantities, but differently depending on the Unit of Measure for each row. If Unit of Measure = "kg", then Quantity X 1000000, else Quantity.
The resulting table would look like the following:
Go to Solution.
Try this, where Table1 is the table you show:
1. Set Table1[ID] in the rows of a matrix visual
2. Create this measure and place it in values of the matrix:
Table1[Unit of Measure] = "kg",
Table1[Quantity] * 1000000,
View solution in original post
So, something like:
VAR __table = SUMMARIZE('Table4',[Item],[Unit of Measure],"__quantity",IF([Unit of Measure]="kg",SUM([Quantity])*1000000,SUM([Quantity])))
See attached Table 4, Page 3
Proud to be a Super User!
Check out new user group experience and if you are a leader please create your group!
Check out how to claim yours today!
Test your skills now with the Cloud Skills Challenge.