Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Conditional Formatting not working correctly in visual

    Posted Jan 11, 2022 07:28 PM
    I have a report with Matrix visual wherein conditional formatting has been applied on the background. There some filters defined on the report.
    Conditional formatting is working correct when no filter is applied (refer to image 1).



    But on applying any filter on the report the conditional formatting goes away (refer to image 2).


    Snapshot of rule defined for conditional formatting (image 3) is provided for reference.



    Would anyone know what is the issue here and how to resolve it.
    The rule defined for conditional formatting is correct and I can't think of any other thing that breaks the conditional formatting on selecting a filter from the drop down.

    ------------------------------
    Rachna
    ------------------------------


  • 2.  RE: Conditional Formatting not working correctly in visual

    Bronze Contributor
    Posted Jan 12, 2022 03:08 AM
    Can't see the data or calcs, so quick check - is the conditional formatting based on values that are null with the filter applied ?

    ------------------------------
    James Watts
    Business Intelligence Analyst
    ------------------------------



  • 3.  RE: Conditional Formatting not working correctly in visual

    Posted Jan 12, 2022 04:59 PM
    Hi James,

    I am providing the calculation for one of the measure, all other measures are exactly same only condition values change in each of them:
    New Courses AP% (Rad):=
    DIVIDE (
    [Number of New Courses Within AP (Rad)],
    [Number of New Courses (Rad)]
    )
    
    [Number of New Courses Within AP (Rad)] :=
    CALCULATE (
    [Number of New Courses],
    FILTER (
    'RT Int',
    'RT Int'[RT_TRT_INT] = "Rad"
    ),
    'RT CA'[Time To Ist TRT (Days)] >= 0
    && 'RT CA'[Time To Ist TRT (Days)] <= 28
    )
    
    [Number of New Courses (Rad)]:=
    CALCULATE (
    [Number of New Courses],
    'RT Int'[RT_TRT_INT] = "Rad"
    )
    
    Number of New Courses:=
    CALCULATE(SUM('RT CA'[New Course])
    ,USERELATIONSHIP('RT CA'[1st Trt Start Date], 'Default Date'[Date])
    )
    

    And yes after applying the filter some measures do return NULL values. As visible in image 2, on applying filter the conditional formatting goes away not only for NULL values but also for those measures which are returning values like - AP% - Pall. NULL values being shown with No background colour is perfectly fine as this is the default behaviour but why does formatting go away in cells that have value. 



    ------------------------------
    Rachna Verma
    ------------------------------