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
RishabhS
New Member

How to create table with measures in row and Calculations on those measures in Columns

I have a set of measures like Average Satisfaction, average Score, etc. which I want to map in a table. Column values are the different periods for these measures. I also want to add another column that shows % Changes in these measures.

Table below for example. (% Change = (Period2 - Period1)/Period 1

Parameters    Period1    Period2   %Change

Param1          30             40             33%

Param2           78%         87%          12%

Param3          4.67          7.2             54%

 

I am not sure how to work out this table. Thank you for your help

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @RishabhS ,

Suppose we have a table like this.

vcgaomsft_0-1669617872380.png

then please new these measures:

 

Period1 = 
SWITCH(
    MAX('Table'[Parameters]),
    "Param1",[Period1 Average Score],
    "Param2",[Period1 Average Satisfaction],
    "Param3",[Period1 Average Score]
)
Period2 = 
SWITCH(
    MAX('Table'[Parameters]),
    "Param1",[Period2 Average Score],
    "Param2",[Period2 Average Satisfaction],
    "Param3",[Period2 Average Score]
)
%Change = DIVIDE([Period2]-[Period1],[Period1])

 

result:

vcgaomsft_1-1669619264044.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

3 REPLIES 3
v-cgao-msft
Community Support
Community Support

Hi @RishabhS ,

Suppose we have a table like this.

vcgaomsft_0-1669617872380.png

then please new these measures:

 

Period1 = 
SWITCH(
    MAX('Table'[Parameters]),
    "Param1",[Period1 Average Score],
    "Param2",[Period1 Average Satisfaction],
    "Param3",[Period1 Average Score]
)
Period2 = 
SWITCH(
    MAX('Table'[Parameters]),
    "Param1",[Period2 Average Score],
    "Param2",[Period2 Average Satisfaction],
    "Param3",[Period2 Average Score]
)
%Change = DIVIDE([Period2]-[Period1],[Period1])

 

result:

vcgaomsft_1-1669619264044.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

PijushRoy
Super User
Super User

Hi @RishabhS 

 

Can you create one sample pbix file and share in Google Drive (any one can access the file), it will help
Also share the expected result screenshot based on your pbix file

Thanks




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





I am working on office systems. Can't share any files. IS there any other way I can help you recreate this scenario?

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!

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.