Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Yggdrasill
Responsive Resident
Responsive 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

16Primary
135Other
15Other
166Other
21Primary
22Other
31Other
34Primary
35Other
36Other
4888Primary
51Primary
61Primary
766Other
755Other
744Primary
733Other


This is my desired OUTPUT. Extra Column which takes the Primary value and fills down the event with that value

16Primary6
135Other6
15Other6
166Other6
21Primary1
22Other1
31Other4
34Primary4
35Other4
36Other4
4888Primary888
51Primary1
61Primary1
766Other44
755Other44
744Primary44
733Other44


This needs to be a calculated column 
Thanks for your help !

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @Yggdrasill 

Create a calculated column:

 

NewCol =
CALCULATE (
    DISTINCT ( Table1[CATEGORY] );
    Table1[LABEL] = "Primary";
    ALLEXCEPT ( TAble1; Table1[EVENT ID] )
)

 

View solution in original post

2 REPLIES 2
Yggdrasill
Responsive Resident
Responsive Resident

Dude, that was brutally simple ! Thanks !

AlB
Super User
Super User

Hi @Yggdrasill 

Create a calculated column:

 

NewCol =
CALCULATE (
    DISTINCT ( Table1[CATEGORY] );
    Table1[LABEL] = "Primary";
    ALLEXCEPT ( TAble1; Table1[EVENT ID] )
)

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.