Forum Discussion

CarlsBerg999's avatar
CarlsBerg999
Helper V
5 years ago

Conditional formatting not working in matrix

Hi,

 

I have a pretty standard set-up with:
4 rows , all measures: Actual revenue, budget, Difference € and Difference %.

12 columns: months 

 

Im trying to put conditional formatting so that negative numbers are red and positive are green. For some reason, january doesn't work. The rule is rather simple and february to december works fine for both red and green figures. How can it be, that january doesnt work? The figure is clearly positive, but it just doesn't react at all. No colors are applied.

2 Replies

  • MattAllington's avatar
    MattAllington
    Community Champion

    You haven't provide enough information for anyone to help you. What are the settings for the conditional format? What does the data model look like?  Where does the data in the matrix come from?  What are the meausres in the matrix? Etc. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  CarlsBerg999  ,

    Here are my steps to do this question for your reference.

    According to your description, I create some data:

    Here are the steps you can follow:

    1. Create measure.

    Difference € =
    var _act=CALCULATE(SUM('Table'[Actual revenue]),FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month])))
    var _bu=CALCULATE(SUM('Table'[budget]),FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month])))
    return
    _act-_bu

    2. Place it in the matrix

    3. Select measure[Difference €], select Conditional formatting – Background color

    4. Enter the Background color interface, select Format by-Rules, Based on field-select measure[Difference €], set the conditions

    5. Result.

    You can downloaded PBIX file from here.

    If this is not up to your expected result, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.