Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
logistics_power
Regular Visitor

calculation between two rows to get result

Hi Experts,

 

I have a matrix visual as below and I would like to calculate Output/ Input = Production recovery % at Process name level

Production areaProcess nameProcess line nameProduction TypeActual M3Forecast M3Budget M3
CaliforniaDryingDry baseinput101010
   output888
 CompactingExtractioninput101010
   output777
  Pelletingoutput888
 GreeningStackinginput101010
   output666
  Peelinginput101010
   output999
 MillingPlaninginput101010
   output999
 JoiningPriminginput101010
   output888

 

Desired output should look like this. This is using direct query and each fields and values coming from different cubes with relationships.

logistics_power_0-1722826016291.png

 

Thanks

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1722830844491.png

 

 

Jihwan_Kim_0-1722830824860.png

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks for your response

My model is something like this. Tables as below

 

The values Actual, Forecast and Budget M3 are measures existing in the model itself that I am pulling in matrix visual.

I am not adding anything in the matrix visual columns.

Values are in the values.

production area, process name, proces line name, production type are added in this order in the rows section.

Your model being slightly different, when I add the new measure to the values it is added as a new column at the end in the visual instead of as a row near the input/output.

Is there any other way we can writ the DAX?

Thanks

logistics_power_0-1722906324463.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.