Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Conditional formatting based on two dates

Hi,   I have next matrix in Power BI, where I need to add conditional formatting to value in columns Jan-2010:Jun 2010 based on Start Date and End Date columns. For instance, for the first row the ...
  • Mariusz's avatar
    6 years ago

    Hi Anonymous 

     

    You can do it by creating Measure like below.

    Conditional Formatting = 
    SUMX( 
        'Table',
        INT (
            AND( 
                'Table'[Date] >= 'Table'[Start Date],
                'Table'[Date] <= 'Table'[End Date] 
            )
        )
    )

    And later using it for Conditional Formating like below.

    This will give you the following result.
    Please see the attached file with the solution.
     
    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski