Forum Discussion

Heonsang's avatar
Heonsang
Frequent Visitor
7 years ago
Solved

Find out first date workable in slicer

Hello,   I'm trying to calculate premier and repeat value from the data table. Last time I could create Premier data by adding the measure CALCULATE(MIN(Data[Transmitted Date]), VALUES(Data[Program...
  • LivioLanzo's avatar
    7 years ago

     

    Hi Heonsang

     

    I do not if i understood it correctly but that is what I did:

     

    created this model

     

     

     

     

     

    and added this measure:

     

    Measure = 
    IF(
        HASONEVALUE( Programs[Program] ),
        IF(
            COUNTROWS( Transmissions ) > 0,
            VAR MinDte = 
            CALCULATE(
                MIN( Transmissions[TransmittedDate(d/m/y)] ),
                ALLSELECTED( 'Calendar' )
            )
            RETURN
            IF( MinDte = MIN( 'Calendar'[Date] ), "Premier", "Repeat" ),
        BLANK()
        )
    )