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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Conditional Formatting Specific Items Using Calculation Group

Hello,

I have a set of time intelligence calulation items in a calculation group, I want to apply conditional formatting to only YoY% variance columns.

PD98_0-1698248648581.png

I essentially want to achieve something similar to whats above. The Measures of Valuations come from a different calculation group.

I have created a calculated item with the following DAX, to attempt to call specific columns then conditionally format based on this.

Conditional Formatting Time Periods =
SWITCH (
    TRUE (),
    SELECTEDMEASURENAME () IN { "Dynamic Measure" },
        VAR currenTimeIntelCalcItem = SELECTEDVALUE ( 'Calculation Group - KPI Datasheet'[Name] )
         
        VAR measure_selected =SELECTEDMEASURE ()
            
        RETURN
            SWITCH (
                TRUE (),
                currenTimeIntelCalcItem = "YoY% Week",                    
                IF ( measure_selected < 0, -1, IF ( measure_selected > 0, 1, 0 ) ),                                      
                BLANK ()
            ),
    SELECTEDMEASURE ()
)
 
When i apply conditional formatting based on [Dynamic Measure], and filter the visual by this above calculation item nothing happens. 
 
Could anyone offer any guidance?
 
Thanks
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I think your issue should be caused by your data model. 

I think you can refer to below blog to learn more details.

For reference: CALCULATION GROUPS AND CONDITIONAL FORMATTING: YES IT’S POSSIBLE.

If this reply still couldn't help you solve your issue, please share a sample file with me and show me a screenshot with me with the result you want. This will make it easier for us to find the solution.

 

Best Regards,
Rico Zhou

 

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

I think your issue should be caused by your data model. 

I think you can refer to below blog to learn more details.

For reference: CALCULATION GROUPS AND CONDITIONAL FORMATTING: YES IT’S POSSIBLE.

If this reply still couldn't help you solve your issue, please share a sample file with me and show me a screenshot with me with the result you want. This will make it easier for us to find the solution.

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
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.