Forum Discussion
Add column to matrix visual
- 7 years ago
Hi Anonymous
This might be a bit of an unnecessarily intricate solution, certainly compared to Zubair_Muhammad's, but you could try:
1. Create a new, table DisplayTable with one column with the values of your Type column plus one for the additional column "Available+Requested". Create a relationship between DisplayTable[Type] and Table1[Type] (Table1 is your current table)
2. Place DisplayTable[Type] in the columns of your matrix visual (the rows are the same as you have now)
3. Create this measure:
Measure = SWITCH ( TRUE (), SELECTEDVALUE ( DisplayTable[Type] ) IN ALL ( Table1[Type] ), SUM ( Table1[Amount] ), CALCULATE ( SUM ( Table1[Amount] ), Table1[Type] IN { "Available", "Requested" } ) )4. Place the measure in values of your matrix visual
- 7 years ago
Anonymous
Most likely nothing wrong :smileyhappy: I hadn't tested it.
Try this small change:
Measure = SWITCH ( TRUE (), SELECTEDVALUE ( DisplayTable[Type] ) IN ALL ( Table1[Type] ), SUM ( Table1[Amount] ), CALCULATE ( SUM ( Table1[Amount] ), DisplayTable[Type] IN { "Available", "Requested" } ) )
Hi Anonymous
This might be a bit of an unnecessarily intricate solution, certainly compared to Zubair_Muhammad's, but you could try:
1. Create a new, table DisplayTable with one column with the values of your Type column plus one for the additional column "Available+Requested". Create a relationship between DisplayTable[Type] and Table1[Type] (Table1 is your current table)
2. Place DisplayTable[Type] in the columns of your matrix visual (the rows are the same as you have now)
3. Create this measure:
Measure =
SWITCH (
TRUE (),
SELECTEDVALUE ( DisplayTable[Type] ) IN ALL ( Table1[Type] ), SUM ( Table1[Amount] ),
CALCULATE (
SUM ( Table1[Amount] ),
Table1[Type] IN { "Available", "Requested" }
)
)4. Place the measure in values of your matrix visual
- AlB7 years agoCommunity Champion
Anonymous
Most likely nothing wrong :smileyhappy: I hadn't tested it.
Try this small change:
Measure = SWITCH ( TRUE (), SELECTEDVALUE ( DisplayTable[Type] ) IN ALL ( Table1[Type] ), SUM ( Table1[Amount] ), CALCULATE ( SUM ( Table1[Amount] ), DisplayTable[Type] IN { "Available", "Requested" } ) )