Forum Discussion

pasupathi's avatar
pasupathi
Helper I
4 years ago
Solved

write the dax logic for all the projects

Dear Helper,
ProjectName     Endate

A                       10/06/2022

B                        15/06/2022

C                        22/07/2022

D                        11/08/2022

E                          25/09/2022

1.logic: for every project there is a endate. for project A the endate is 10/06/2022 when the endate lies between 06/06/2022 to 09/06/2022 it has show "YELLOW" color. enddate for project A is 10/06/2022 or >10/06/2022 it has show "RED" color.
For each and every Project the logic has to work      
2. there is only one table 

Regards
Dilip

  • Hi pasupathi ,

     

    You could create a measure as below and use it for conditional formatting:-

    Measure 2 =
    IF (
        MAX ( 'Table (3)'[End date] ) >= DATE ( 2022, 06, 06 )
            && MAX ( 'Table (3)'[End date] ) <= DATE ( 2022, 09, 06 ),
        "YELLOW",
        "RED"
    )
    

    Output:-

     

2 Replies

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi pasupathi ,

     

    You could create a measure as below and use it for conditional formatting:-

    Measure 2 =
    IF (
        MAX ( 'Table (3)'[End date] ) >= DATE ( 2022, 06, 06 )
            && MAX ( 'Table (3)'[End date] ) <= DATE ( 2022, 09, 06 ),
        "YELLOW",
        "RED"
    )
    

    Output:-

     

  • Dear Helper,
       can we pass above "measure"  has to take the dynamically