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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Syndicate_Admin
Administrator
Administrator

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):

Matias1986_0-1665492433368.png

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

Matias1986_1-1665492476812.png

Best regards!

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Solution found

A new table is created

Matias1986_0-1665518819715.png

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:
Matias1986_1-1665518886723.png

Best regards!

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Solution found

A new table is created

Matias1986_0-1665518819715.png

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:
Matias1986_1-1665518886723.png

Best regards!

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.