Forum Discussion
Slicing measures in calculated table
- 9 years ago
Hi jscottNRG,
According to the description above, you should be able to follow steps below to reorganize the measures on a Table visual, instead of using a calculated table.
I assume you have table with a column called "Inspection Item" of value "Item 1", "Item 2"(if you don't have it yet, you need to add it first).
1. Use the formula below to create a new measure for "Pass Count".
Pass Count = SWITCH ( FIRSTNONBLANK ( 'Table1'[Inspection Item], 1 ), "Item 1", 'My Calcs'[Item 1 Pass], "Item 2", 'My Calcs'[Item 2 Pass], 0 )2. Use the formula below to create a new measure for "Fail Count".
Fail Count = SWITCH ( FIRSTNONBLANK ( 'Table1'[Inspection Item], 1 ), "Item 1", 'My Calcs'[Item 1 Fail], "Item 2", 'My Calcs'[Item 2 Fail], 0 )Note: Just replace "Table1" with your real table name that has the "Inspection Item" column.
3. Then you should be able to show the "Inspection Item" column with the new "Pass Count" and "Fail Count" measure on the Table visual. :smileyhappy:
Regards
Hi jscottNRG,
According to the description above, you should be able to follow steps below to reorganize the measures on a Table visual, instead of using a calculated table.
I assume you have table with a column called "Inspection Item" of value "Item 1", "Item 2"(if you don't have it yet, you need to add it first).
1. Use the formula below to create a new measure for "Pass Count".
Pass Count =
SWITCH (
FIRSTNONBLANK ( 'Table1'[Inspection Item], 1 ),
"Item 1", 'My Calcs'[Item 1 Pass],
"Item 2", 'My Calcs'[Item 2 Pass],
0
)
2. Use the formula below to create a new measure for "Fail Count".
Fail Count =
SWITCH (
FIRSTNONBLANK ( 'Table1'[Inspection Item], 1 ),
"Item 1", 'My Calcs'[Item 1 Fail],
"Item 2", 'My Calcs'[Item 2 Fail],
0
)
Note: Just replace "Table1" with your real table name that has the "Inspection Item" column.
3. Then you should be able to show the "Inspection Item" column with the new "Pass Count" and "Fail Count" measure on the Table visual. :smileyhappy:
Regards
- jscottNRG9 years ago
Helper II
Fantastic! Thanks v-ljerr-msft - I have over 200 "Inspection Items" so it wasn't exactly fast to implement this solution, but it worked exactly as intended and got me past my sticking point.
I appreciate the help!