How to do it...

To implement this recipe, do the following:

  1. Create the following measures:
GM % = 
DIVIDE(
( SELECTEDVALUE('R01_Revenue'[Value]) - SELECTEDVALUE('R01_Cost'[Value]) ),
SELECTEDVALUE('R01_Revenue'[Value]),
BLANK()
)

Revenue =
DIVIDE(
SELECTEDVALUE('R01_Cost'[Value]),
( 1 - SELECTEDVALUE('R01_GrossMargin'[Value])),
BLANK()
)

Cost =
SELECTEDVALUE('R01_Revenue'[Value]) * (1 - SELECTEDVALUE('R01_GrossMargin'[Value]))
  1. Format GM % as a percentage.
  2. On the Report page, create a Card visualization and place the GM % measure in the Fields area for the visualization.
  3. Choose 100 from the Revenue slicer and 60 from the Cost slicer. Note that the GM % card visualization displays 40.00%. Thus, for a revenue of $100 and a cost of $60, the gross margin percentage is 40%.
  4. On the same Report page, create a second Card visualization and place the Revenue measure in the Fields area for the visualization.
  5. Leave the Revenue and Cost slicers set to 100 and 60, respectively, and choose 40.00% from the Gross Margin slicer.
  6. Note that the Revenue card visualization displays 100. Thus, for a cost of $60 and a desired gross margin % of 40%, the revenue needs to be $100.
  7. On the same Report page, create a third Card visualization and place the Cost measure in the Fields area for the visualization. Note that this card visualization displays 60, indicating that for a revenue of $100 and a desired gross margin of 40%, the cost needs to be $60. Change the Gross Margin slicer to 55.00% and notice that the Cost card visualization value changes to 45.