Forum Discussion

logistics_power's avatar
logistics_power
Regular Visitor
2 years ago

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.

 

Thanks

2 Replies

  • 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.

     

     

     

     

     

     

    • logistics_power's avatar
      logistics_power
      Regular Visitor

      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