Forum Discussion
Power BI Matrix one sum stays blank. Why?
- Anonymous2 years ago
For your question, here is the method I provided:
The presentation of data in power bi and excel will be different, the style in your screenshot may not be possible, but I have another way for your reference.
Here's some dummy data
“Table”
Create a new table.
Table 2 = UNION( SELECTCOLUMNS( 'Table', "type", 'Table'[type], "type_pay", 'Table'[type_pay], "year", 'Table'[year], "value",SWITCH(TRUE(), 'Table'[year] = 2023, 'Table'[value], 'Table'[year] <> 2023, 0)), SELECTCOLUMNS( 'Table', "type", "_" & 'Table'[type], "type_pay", 'Table'[type_pay], "year", 'Table'[year], "value",SWITCH(TRUE(), 'Table'[year] = 2023, BLANK(), 'Table'[year] <> 2023, 'Table'[value])) )You can get the table like this.
Create a matrix.
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
For your question, here is the method I provided:
The presentation of data in power bi and excel will be different, the style in your screenshot may not be possible, but I have another way for your reference.
Here's some dummy data
“Table”
Create a new table.
Table 2 =
UNION(
SELECTCOLUMNS(
'Table',
"type", 'Table'[type],
"type_pay", 'Table'[type_pay],
"year", 'Table'[year],
"value",SWITCH(TRUE(), 'Table'[year] = 2023, 'Table'[value], 'Table'[year] <> 2023, 0)),
SELECTCOLUMNS(
'Table',
"type", "_" & 'Table'[type],
"type_pay", 'Table'[type_pay],
"year", 'Table'[year],
"value",SWITCH(TRUE(), 'Table'[year] = 2023, BLANK(), 'Table'[year] <> 2023, 'Table'[value]))
)
You can get the table like this.
Create a matrix.
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.