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
4 years agoCommunity Champion
- Anonymous4 years agoNot applicable
Thanks for your answer! Yet, there is an error "A circulated dependency was detected..." now.
In your file, this error is not found, but the result seems different. 😞
Could you kindly take another look? Much appreciated!
- CNENFRNL4 years agoCommunity Champion
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] ) )- Anonymous4 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!