Forum Discussion

Rosebud's avatar
Rosebud
New Member
9 years ago
Solved

subtract if

Hi All, 

 

I need help figuring something out in Power BI. 

 

I am using the matrix visualization. 

 

I have a column I created that shows either Pre Test, Test, or Post Test based on week numbers. This is in the rows field. 

 

I have 3 measures in the values field that show a metric %. I would like to be able to take that metric % and subtract Post Test from Pre Test.

 

Is there a way to do this? I am open to adding a new visualization to show the data, but I can't figure out how to subtract with the conditions.

 

Thank you!

  • I figured it out if anyone were to need help with this in the future.

     

    Group 1 Delta = Calculate([Group 1 Metric],filter('Dataset name','Dataset name'[StatusColumn]="time frame"))-Calculate([group 1 delta],filter('Dataset name','Dataset name'[StatusColumn]="time frame"))

1 Reply

  • I figured it out if anyone were to need help with this in the future.

     

    Group 1 Delta = Calculate([Group 1 Metric],filter('Dataset name','Dataset name'[StatusColumn]="time frame"))-Calculate([group 1 delta],filter('Dataset name','Dataset name'[StatusColumn]="time frame"))