Forum Discussion
Yggdrasill
7 years agoResponsive Resident
Fill down column based on values with DAX
Hi !
I have 3 columns - EVENT ID, CATEGORY and LABEL
There's always ONE Primary LABEL within every EVENT, rest is Other
| 1 | 6 | Primary |
| 1 | 35 | Other |
| 1 | 5 | Other |
| 1 | 66 | Other |
| 2 | 1 | Primary |
| 2 | 2 | Other |
| 3 | 1 | Other |
| 3 | 4 | Primary |
| 3 | 5 | Other |
| 3 | 6 | Other |
| 4 | 888 | Primary |
| 5 | 1 | Primary |
| 6 | 1 | Primary |
| 7 | 66 | Other |
| 7 | 55 | Other |
| 7 | 44 | Primary |
| 7 | 33 | Other |
This is my desired OUTPUT. Extra Column which takes the Primary value and fills down the event with that value
| 1 | 6 | Primary | 6 |
| 1 | 35 | Other | 6 |
| 1 | 5 | Other | 6 |
| 1 | 66 | Other | 6 |
| 2 | 1 | Primary | 1 |
| 2 | 2 | Other | 1 |
| 3 | 1 | Other | 4 |
| 3 | 4 | Primary | 4 |
| 3 | 5 | Other | 4 |
| 3 | 6 | Other | 4 |
| 4 | 888 | Primary | 888 |
| 5 | 1 | Primary | 1 |
| 6 | 1 | Primary | 1 |
| 7 | 66 | Other | 44 |
| 7 | 55 | Other | 44 |
| 7 | 44 | Primary | 44 |
| 7 | 33 | Other | 44 |
This needs to be a calculated column
Thanks for your help !
Hi Yggdrasill
Create a calculated column:
NewCol = CALCULATE ( DISTINCT ( Table1[CATEGORY] ); Table1[LABEL] = "Primary"; ALLEXCEPT ( TAble1; Table1[EVENT ID] ) )
2 Replies
- AlBCommunity Champion
Hi Yggdrasill
Create a calculated column:
NewCol = CALCULATE ( DISTINCT ( Table1[CATEGORY] ); Table1[LABEL] = "Primary"; ALLEXCEPT ( TAble1; Table1[EVENT ID] ) ) - YggdrasillResponsive Resident
Dude, that was brutally simple ! Thanks !