Forum Discussion
Anonymous
6 years agoNot applicable
DAX Calculated Column
Hi, this is my request: I need to find [Date] of the previous row by date (highest date less than the current date) adding these conditions: [First_Parameter] of this row must be equal to [Fir...
- 6 years ago
Try a new column like, you can add condition using && (and) || or , inside the same filter
Last Date Time = maxx(filter(table,table[Date Time]<earlier(table[Date Time]) && table[param1] =earlier(table[param1]) && table[A] =earlier(table[A])),table[Date Time])
Max value = maxx(filter(table,table[team] =earlier(table[team]) && table[A] =earlier(table[A])),table[B])
Mariusz
6 years agoCommunity Champion
Hi Anonymous
Try this
Measure =
VAR __date = SELECTEDVALUE( My_Table[Data] )
VAR __firstParameter = SELECTEDVALUE( My_Table[First_Parameter] )
VAR __secondParameter = SELECTEDVALUE( My_Table[Second_Parameter] )
RETURN
CALCULATE(
MAX( My_Table[Data] ),
FILTER(
ALL( My_Table[Data], My_Table[First_Parameter], My_Table[Second_Parameter] ),
My_Table[Data] < __date &&
My_Table[First_Parameter] = __firstParameter &&
My_Table[Second_Parameter] <> __secondParameter
)
)
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.