Forum Discussion

LP280388's avatar
LP280388
Icon for Resolver II rankResolver II
4 years ago
Solved

Variable in Calculated column not taking a value from nonrelated table

Hi Team,   I have the below Measure which results in Yes/No based on the condtions given.  Due to some reason I need to change this measure to a Calculated column so that it can be used in other m...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi LP280388

     

    Try adding a filter() to the formula.

    VAR FirstDay =
        CALCULATE (
            MIN ( 'From Date'[Date] ),
            FILTER ( ALLSELECTED ( 'From Date'[Date] ), 1 = 1 )
        )
    VAR LastDay =
        CALCULATE (
            MAX ( 'To Date'[Date] ),
            FILTER ( ALLSELECTED ( 'From Date'[Date] ), 1 = 1 )
        )

     

    Best Regards,

    Jay