Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
3 years ago
Solved

Reorder table to improve visual

Estimated,

with greeting, I have the following query:

The thing is, I have two columns that I would like to represent in a table as if they were rows, but when using the following DAXs:

Demand = SUM('DL Test'[Demand])
Capacity = AVERAGE('DL Test'[Capacity])
Occupancy = 'DAX'[Demand]/'DAX'[Capacity]

It is represented to me in this way (calculations as a subcategory for each month):

Is there any way to apply DAX, or any option in QUERY? the table appears to me as follows? (example excel):

Best regards!

  • Solution found

    A new table is created

    and the following measure is created

    KPI = IF(HASONEVALUE('Calculation'[Calculation]),SWITCH(VALUES('Calculation'[Calculation]),"Capacity",[Capacity],"Demand",[Demand],"Occupation",[Occupation]))
    Where:
    The new measure is within the newly created Table (not another).
    The result is as follows:

    Best regards!

2 Replies

  • Solution found

    A new table is created

    and the following measure is created

    KPI = IF(HASONEVALUE('Calculation'[Calculation]),SWITCH(VALUES('Calculation'[Calculation]),"Capacity",[Capacity],"Demand",[Demand],"Occupation",[Occupation]))
    Where:
    The new measure is within the newly created Table (not another).
    The result is as follows:

    Best regards!

    • v-yinliw-msft's avatar
      v-yinliw-msft
      Icon for Community Support rankCommunity Support

      Hi Syndicate_Admin ,

       

      Happy to hear you that you solved your questions.

      Please consider Accept a correct reply as the solution to help others find it.

       

      Best Regards,

      Community Support Team _Yinliw