Forum Discussion
Calculated Measure in Row
- Anonymous2 years ago
Hi ChrisFromOhio ,
Please try the following methods and check if they can solve your problem:
1.Create a measure for Sales $.
Sales Amount = SUMX(FILTER('Table', 'Table'[Attribute] = "Sales $"), 'Table'[Value])2.Create a measure for Sales U.
Sales U = SUMX(FILTER('Table', 'Table'[Attribute] = "Sales U"), 'Table'[Value])3.Create a measure for Cost $.
Cost Amount = SUMX(FILTER('Table', 'Table'[Attribute] = "Cost $"), 'Table'[Value])4.Create a measure for Margin.
Margin = DIVIDE([Cost Amount], [Sales Amount], BLANK())5.Create a disconnected table that lists the attributes.
6.Create the conditional measure for display.
Display Value = SWITCH( SELECTEDVALUE('Table Ro'[Attribute]), "Sales U", [Sales U], "Sales $", [Sales Amount], "Cost $", [Cost Amount], //"Margin", [Margin], "Margin", FORMAT([Margin], "0.0%"), BLANK() )7.Drag the new table to the Rows in the matrix visual and Drag the conditional measure into the Values area.
8.The result is shown below.
Best Regards,
Wisdom Wu
Try the following:
instead of using the Attribute column, create a measure that calculates each concept
Cost = calculate(sum(table[value]), table[attribute]= "Cost")
and so on for the others and also for the margin
Once you have created the 4 measures, you use them in the values section of the matrix.
If you want these values in rows or columns, you can customize the array to do the conversion in the Format / Values / Change values to rows panel.