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
Hi ChrisFromOhio ,
If I understand correctly, the issue is that you want to create a matrix visual. Please try the following methods and check if they can solve your problem:
1.Select the matrix visual in the visualization pane.
2.Drag the Date field to the Columns area of the matrix visual.
3.Drag the Attribute field to the Rows area of the matrix visual.
4.Drag the value field to the Values area of the matrix visual.
5.The result is shown in the below.
Looking forward to your reply.
Best Regards,
Wisdom Wu
Hi Wisdom - my question is how do I get the fourth attribute Margin (Cost/Sales) into the rows of the matrix?