Forum Discussion
Anonymous
6 years agoNot 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 ...
- 6 years ago
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" ) )Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
V-lianl-msft
Community Support
6 years agoHi 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"
)
)
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
6 years agoNot 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