Forum Discussion
getitout
Helper I
6 years agoUse 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 ...
- 6 years ago
Hi,
According to your description, i create a sample to test:
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:
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:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto Zhi
v-gizhi-msft
Community Support
6 years agoHi,
According to your description, i create a sample to test:
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:
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:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto Zhi