Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
this is tableau calcalation and i want conver into dax
i need help on this..
IF LOOKUP(MIN([DCC]),0) = LOOKUP(MIN([DCC]),-1)
THEN DATEDIFF('day',LOOKUP(MIN([CR Status Changed Date]), -1), LOOKUP(MIN([CR Status Changed Date]), 0))
END
Solved! Go to Solution.
Hi @Anonymous
It looks like you would like to calculate the interval of CR Status Changed Date for same DCC. If so, you may try this Measure.
DateDiff_ =
VAR val =
SELECTEDVALUE ( 'Table'[CR Status Changed Date] )
VAR cur_date =
CALCULATE (
val,
FILTER ( ALL ( 'Table' ), 'Table'[DCC] = MAX ( 'Table'[DCC] ) )
)
VAR search_date =
CALCULATE (
MIN ( 'Table'[CR Status Changed Date] ),
FILTER ( ALL ( 'Table' ), 'Table'[DCC] = MAX ( 'Table'[DCC] ) )
)
RETURN
DATEDIFF ( search_date, cur_date, DAY )
Then, result should look like this:
Attached the pbix file as reference.
Best Regards,
Community Support Team _ Caiyun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If you still have problems on it or I misunderstand your needs, please feel free to let me know. Thanks a lot!
Hi @Anonymous
It looks like you would like to calculate the interval of CR Status Changed Date for same DCC. If so, you may try this Measure.
DateDiff_ =
VAR val =
SELECTEDVALUE ( 'Table'[CR Status Changed Date] )
VAR cur_date =
CALCULATE (
val,
FILTER ( ALL ( 'Table' ), 'Table'[DCC] = MAX ( 'Table'[DCC] ) )
)
VAR search_date =
CALCULATE (
MIN ( 'Table'[CR Status Changed Date] ),
FILTER ( ALL ( 'Table' ), 'Table'[DCC] = MAX ( 'Table'[DCC] ) )
)
RETURN
DATEDIFF ( search_date, cur_date, DAY )
Then, result should look like this:
Attached the pbix file as reference.
Best Regards,
Community Support Team _ Caiyun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If you still have problems on it or I misunderstand your needs, please feel free to let me know. Thanks a lot!
@Anonymous , In tableau LOOKUP is a table calculation, which means you can go across visual rows. In Power bi, there is no equivalent. You have to perform calculation using row context
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |