Forum Discussion
Ryo15
4 years agoNew Member
Text value in matrix
I have table with information about machine parts.
Initial Data looks like:
| Level 1 | Level 2 | Name |
| A | - | aaa |
| A | A1 | bbb |
| A | A2 | ccc |
I want to sea a hierarchy of Level 1 and Level2, so I need to drag Lebel1 and Level2 to Rows.
Example of expected data in matrix:
| Level 1 | Name |
| A | aaa |
↓ Drill
| Level 1 | Level 2 | Name |
| A | - | aaa |
| A1 | bbb | |
| A2 | ccc |
But the matrix displayed like this:
| Level 1 | Name |
| A | bbb |
↓ Drill
| Level 1 | Level 2 | Name |
| A | - | aaa |
| A1 | bbb | |
| A2 | ccc |
I want to display "aaa" as name of "A".
Please tell me if there is any solution to that.
1 Reply
- amitchandakSuper User
Ryo15 , use is in scope
Switch( True() ,
isinscope(Table[Level 2]), Max(Table[Name])
calculate( Max(Table[Name]) , filter(Table, Table[Level 2] = "-"))
)
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/