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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
getitout
Helper I
Helper I

Use Calculated Fields as rows

Hi,

I am very new to Power BI and I need your advice.

I have many calculated fields which need to combine and present in rows for example

Expected Output

Name  Evaluation_Period KPI1

Mr A   Q1                          90

Mr A   Q4                          80

MR A Result                   Fail

MR B    Q1                       80

MR B    Q4                      85

MR B   Result               Pass

 

Currently I have prepared calculated field KPI1 like Pre_KPI1, Post_KPI1

I can display in table  like

Name  Pre_KPI1, Post_KPI1  

I don't know how to make it to row.

Thank you very much

 

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

Hi,

 

According to your description, i create a sample to test:

30.PNG

Then try to create a new calculated table:

Table 2 = UNION(DISTINCT(SELECTCOLUMNS('Table',"New Evaluation_Period",'Table'[Evaluation_Period ])),DATATABLE("E",STRING,{{"Result"}}))

It shows:

31.PNG

Then try this measure:

New KPI1 = IF(SELECTEDVALUE('Table 2'[New Evaluation_Period]) = "Result",MAX('Table'[Result]),CALCULATE(SUM('Table'[ KPI1]),FILTER('Table','Table'[Evaluation_Period ] = SELECTEDVALUE('Table 2'[New Evaluation_Period]))))

 The result shows:

32.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto Zhi

View solution in original post

1 REPLY 1
v-gizhi-msft
Community Support
Community Support

Hi,

 

According to your description, i create a sample to test:

30.PNG

Then try to create a new calculated table:

Table 2 = UNION(DISTINCT(SELECTCOLUMNS('Table',"New Evaluation_Period",'Table'[Evaluation_Period ])),DATATABLE("E",STRING,{{"Result"}}))

It shows:

31.PNG

Then try this measure:

New KPI1 = IF(SELECTEDVALUE('Table 2'[New Evaluation_Period]) = "Result",MAX('Table'[Result]),CALCULATE(SUM('Table'[ KPI1]),FILTER('Table','Table'[Evaluation_Period ] = SELECTEDVALUE('Table 2'[New Evaluation_Period]))))

 The result shows:

32.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto Zhi

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.