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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

DAX : Create a filtered column based on another column

Hello, 

 

I'm struggling with a DAX column calculation, I want to create a column based on a specific row, there are information about columns concerned : 

 

- Event_Biztranslist : ID of parcel

- Event_Type : Type of event 

- Event_Time : Date/Time of the event 

- Readpoint_Type : "Tunnel" or "Reader" 

- Rank : for each parcel, ranking events by Event_Time (first = most ancient, last = most recent)

 

This is the rule : for each [Event_Biztranslist] print the [Readpoint_Type] associated to the first "ObjectEvent"

 

To illustrate :

 

DrissChm_0-1596029602871.png

 

 

The result in the new column should be : 

Reader

Reader

Reader

Reader

Reader

Tunnel

Tunnel

Tunnel

 

@tex628 

Regards, 

Driss

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try this:

Column =
CALCULATE (
    FIRSTNONBLANK ( 'Table (2)'[Relation_Type], MIN ( 'Table (2)'[Event_Time] ) ),
    FILTER (
        ALLEXCEPT ( 'Table (2)', 'Table (2)'[Event_Biztranslist] ),
        'Table (2)'[Event_Type] = "OE"
    )
)

test_Create a filtered column based on another column.PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
tex628
Community Champion
Community Champion

@V-lianl-msft 's solutions should work. 🙂

/ J


Connect on LinkedIn
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try this:

Column =
CALCULATE (
    FIRSTNONBLANK ( 'Table (2)'[Relation_Type], MIN ( 'Table (2)'[Event_Time] ) ),
    FILTER (
        ALLEXCEPT ( 'Table (2)', 'Table (2)'[Event_Biztranslist] ),
        'Table (2)'[Event_Type] = "OE"
    )
)

test_Create a filtered column based on another column.PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hello Liang, 

 

Many thanks, it works good for me 🙂

Btw, for info I find a solution through an intermediate calculation with boolean :

 

3. Parcels Reworked by Tunnel = 
IF(Qualification[Event_Type] = "ObjectEvent" 
        && Qualification[Readpoint_Type] = "Tunnel"
        && Qualification[Rank] > 1,
        1,0)
 

 Then : 

X. Rework Mode = 
VAR sum_check = CALCULATE(
    SUM(Qualification[3. Parcels Reworked by Tunnel]),
    ALLEXCEPT(Qualification, Qualification[Event_BizTransList])
)
RETURN 
    IF(sum_check = 1, "Tunnel" , "Reader")

 

Yours is more optimized 

 

Best regards, 

Driss

 

Anonymous
Not applicable

Hello @amitchandak 

 

Thanks for your answer, 

The rank had already done in the concerned columns, the idea is to return for each row of the parcel ID, the value of [Readpoint_type] associated to the "ObjectEvent" value 

 

Driss

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.