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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Community Champion
Community Champion

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
Community Champion
Community Champion

Hi @Yggdrasill 

Create a calculated column:

 

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

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.