Forum Discussion
Add calculated Row in table
- 4 years ago
Hi, marial16
You could create measures and change the Total field to the division you want.Like this:
_Own Staff = IF( ISINSCOPE('Table'[Index]),SUM('Table'[Own Staff ]), DIVIDE( CALCULATE(SUM('Table'[Own Staff ]),FILTER(ALL('Table'),'Table'[Index]=MAX('Table'[Index]))), CALCULATE(SUM('Table'[Own Staff ]),FILTER(ALL('Table'),'Table'[Index]=MAXX(FILTER(ALL('Table'),'Table'[Index]<MAX('Table'[Index])),[Index]))) ) )Result:
Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, marial16
You could create measures and change the Total field to the division you want.
Like this:
_Own Staff =
IF(
ISINSCOPE('Table'[Index]),SUM('Table'[Own Staff ]),
DIVIDE(
CALCULATE(SUM('Table'[Own Staff ]),FILTER(ALL('Table'),'Table'[Index]=MAX('Table'[Index]))),
CALCULATE(SUM('Table'[Own Staff ]),FILTER(ALL('Table'),'Table'[Index]=MAXX(FILTER(ALL('Table'),'Table'[Index]<MAX('Table'[Index])),[Index])))
)
)
Result:
Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I finally managed to create the calculated row, however i was wondering if this solution would work if i had more rows in the same table or is it a best practice to create another table?
example :
| Own Staff | Contractors |
| 157 | 171 |
| 141 | 119 |
| 0.898 | 0.696 |
| 284 | 163 |
| 1.809 | 0.953 |
where 1.809 is the result of 284 / 157
And a last question of mine would be if i can use an excel file (calculations included) in Power BI without having to create all those measures.
I had decided to organise the data in SharePoint Lists. However i am not sure if it is the best practice.
Thank you