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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
villa1980
Resolver II
Resolver II

Conditional Format Month which changes

Hi all,

 I have the below parameter and what I would like to do is highlight the minimum month in red to indicate this does not belong to the promotion date
In this case October would be the minimum, however, there are other parameters that I want to include in my slicer which will have a different minimum month.
 How would I go about creating this, I realise it is through DAX then add it as a conditional format but am stumped

 

Dummy 1 2 Tyres = CALCULATE(
    [Count Sale Id],
    VAR StartDate = DATE(2025,02,04)
    VAR EndDate = DATE(2025,03,31)
    RETURN
    DATESBETWEEN('ODS AAS_DATES'[DATE],StartDate,EndDate),
    FILTER('ODS AAS_PRODUCTS','ODS AAS_PRODUCTS'[PRODUCT BRAND] = "Dummy1"),
    FILTER('PBI VW_MARKETING_TRADING',
    'PBI VW_MARKETING_TRADING'[Sub_Activity_LU] = "SA01 - TYRES" &&
    NOT(CONTAINSSTRING('PBI VW_MARKETING_TRADING'[Code_7_LU],"X")) && [Units] = 2
))

Thanks
Alex
1 ACCEPTED SOLUTION
villa1980
Resolver II
Resolver II

I have sorted it 🙂

So I created a Google sheet with dates in and the promotions, those dates they fell in I put in a Y and the prior month I put in P.
Imported this, joined it to the dates table and within the conditional format part I put the rule as if it is P then light green.

View solution in original post

3 REPLIES 3
villa1980
Resolver II
Resolver II

I have sorted it 🙂

So I created a Google sheet with dates in and the promotions, those dates they fell in I put in a Y and the prior month I put in P.
Imported this, joined it to the dates table and within the conditional format part I put the rule as if it is P then light green.

Akash_Varuna
Super User
Super User

Hi @villa1980 to highlight the minimum month could you try these please

  • Create a DAX Measure: Create a measure to identify the minimum month based on your selected slicer.

 

HighlightMinMonth = 
VAR MinMonth = MIN('ODS AAS_DATES'[Month]) 
RETURN 
IF(SELECTEDVALUE('ODS AAS_DATES'[Month]) = MinMonth, 1, 0)

 

 

  • Apply Conditional Formatting:

    • In your visual, go to the conditional formatting settings for the column representing months.
    • Set the background or font color based on the HighLightMinMonth measure.
    • Use a red color for the value 1 and no formatting for 0.

 

 

Thank-you for the reply. Unfortunately the measure does not seem to work as it is returning the minimum value of the Date table rather than the selected value from the parameter.

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors