Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

View discussion in a popup

Replying to:
Anonymous
Not applicable

HI Elisa112,

Did you means the expression are used to calculate with static type values? If that is the case, you can try to use the following measure formula if it suitable for your requirement.

formula =
VAR intro =
    CALCULATE (
        MIN ( Table1[Date] ),
        FILTER ( ALLSELECTED ( Table1 ), [Type] = "Introduction" ),
        VALUES ( Table1[UserID] )
    )
VAR asse =
    CALCULATE (
        MAX ( Table1[Date] ),
        FILTER ( ALLSELECTED ( Table1 ), [Type] = "Assess" ),
        VALUES ( Table1[UserID] )
    )
RETURN
    DATEDIFF ( intro, asse, DAY )

If you mean these results will apply to calculate with dynamic rolling between different type of values, it should difficulty than calculate on specific values.

I'd like to suggest you to add an index filed of the type filed values, then you can use the current index to find out current type and previous type to get difference.

Regards,
Xiaoxin Sheng