Forum Discussion
Anonymous
4 years agoNot applicable
Loop-like feature in Power BI?
Dear all I am trying to return different value in a new column if I find a specific value in several rows. For example, I am trying to return the earliest view date when I found "Contact Cust...
- 4 years ago
View Date CC = VAR __v = FILTER( 'CASE', 'CASE'[Case] = EARLIER( 'CASE'[Case] ) && 'CASE'[Action] = "View" ) RETURN IF( ISEMPTY( FILTER( 'CASE', 'CASE'[Case] = EARLIER( 'CASE'[Case] ) && 'CASE'[Action] = "Contact Customer Service" ) ), MAXX( __v, 'CASE'[Time_Stamp] ), MINX( __v, 'CASE'[Time_Stamp] ) )
CNENFRNL
Community Champion
4 years agoView Date CC =
VAR __v =
FILTER(
'CASE',
'CASE'[Case] = EARLIER( 'CASE'[Case] ) && 'CASE'[Action] = "View"
)
RETURN
IF(
ISEMPTY(
FILTER(
'CASE',
'CASE'[Case] = EARLIER( 'CASE'[Case] ) && 'CASE'[Action] = "Contact Customer Service"
)
),
MAXX( __v, 'CASE'[Time_Stamp] ),
MINX( __v, 'CASE'[Time_Stamp] )
)Anonymous
4 years agoNot applicable
The
MAXX( __v, 'CASE'[Time_Stamp] ),
MINX( __v, 'CASE'[Time_Stamp] )The MINX should come first and MAXX come second, but this DAX and logic work for me. Thanks again!