Forum Discussion
Matrix table calculation in education setting.
- 6 years ago
Hi silverfox
I can work wout with two kinds of visual, please let me know which you like better or anything else.
1.
2.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - 6 years ago
Hi silverfox
See details here:
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting
Best Regards
Maggie
Hi silverfox
My visual 2 is recommended based on my experience.
Here are steps i make it:
1. assume you table as below
2.
In Edit queries,
Split column for "detail" column,
replace the "null" with "Actual" value,
then close&&apply, return to report view
3.
Create measures in Detail table
Measure =
VAR actual =
CALCULATE (
SUM ( 'detail table'[Result] ),
FILTER (
ALLSELECTED ( 'detail table' ),
'detail table'[student id] = MAX ( 'detail table'[student id] )
&& 'detail table'[Basic details.category] = "Actual"
)
)
VAR estimate =
CALCULATE (
SUM ( 'detail table'[Result] ),
FILTER (
ALLSELECTED ( 'detail table' ),
'detail table'[student id] = MAX ( 'detail table'[student id] )
&& 'detail table'[Basic details.category] = "Estimate"
)
)
RETURN
actual - estimate
Measure 2 = IF(ISINSCOPE('detail table'[Basic details.category]),SUM('detail table'[Result]),[Measure])
4. edit the format of the matrix->Subtotal
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Maggie
Your first version is perfect as a single page is just 1 subject. Is there way to conditionally format the difference column.
Many thanks again
Craig
- v-juanli-msft6 years agoCommunity Support
Hi silverfox
See details here:
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting
Best Regards
Maggie