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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
tobiasmcbride
Helper III
Helper III

Formatting chart visual and slicers

I have a chart visual which is displaying interlinked data on actual vs budgeted headcount. The headcount and latest budget visual displays perfectly for the dates.

 

However, I have some slicers on the report that I can apply to the current headcount to give me an idea of trends over time (i.e., how many at a particular pay grade, team, location etc.). This filters the actual data quite nicely but was wondering if, when I select these slicers if there was a way to remove the budget line from the visual as the budget does not have the same level of granularity as the actuals data. 

 

When I select the visual slicers it does correctly filtert actuals but budget stays on the graph and because it is a total figure is very high and distorts the chart visual for the actuals data. 

 

Any advice on filtering this or working out a way to display both would be fantastic.

1 ACCEPTED SOLUTION

Hi @tobiasmcbride ,

 

You can create something similar to this:

 

 

 

Measure =
VAR slicer1 =
    IF (
        DISTINCTCOUNT ( 'Table (2)'[SlicerColumn1] )
            = CALCULATE (
                DISTINCTCOUNT ( 'Table (2)'[SlicerColumn1] );
                ALL ( 'Table (2)'[SlicerColumn1] )
            );
        1;
        0
    )
VAR slicer2 =
    IF (
        DISTINCTCOUNT ( 'Table (2)'[SlicerColumn2] )
            = CALCULATE (
                DISTINCTCOUNT ( 'Table (2)'[SlicerColumn2] );
                ALL ( 'Table (2)'[SlicerColumn2] )
            );
        1;
        0
    )
RETURN
    IF ( slicer1 + slicer2 = 1; blank; [Budget])

 

 

 

Add a slicer setting per each slicer and keep adding +  for each variable.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

5 REPLIES 5
MFelix
Super User
Super User

Hi @tobiasmcbride ,

 

Depending on the slicers you are selecting you may need to adjust your budget measure with something similar to this:

 

Budget = IF (DistinctCount(Table[SlicerColumn]) = DistinctCount(ALL(Table[SlicerColumn])) ; [BudgetMeasure]; Blanks())

 

So basically you are checking if all the options on the slicer are being selected if yes the value return nothing otherwise returns the budget. You can add additional parameters if you have more than 1 slicer.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix 

 

I cannot seem to use that formula as it suggests it only accepts a column reference as an argument - i don't think it's allowing the "ALL" function?

And in addition @MFelix how can I add in additional categories/sliders into the formula?

Hi @tobiasmcbride ,

 

You can create something similar to this:

 

 

 

Measure =
VAR slicer1 =
    IF (
        DISTINCTCOUNT ( 'Table (2)'[SlicerColumn1] )
            = CALCULATE (
                DISTINCTCOUNT ( 'Table (2)'[SlicerColumn1] );
                ALL ( 'Table (2)'[SlicerColumn1] )
            );
        1;
        0
    )
VAR slicer2 =
    IF (
        DISTINCTCOUNT ( 'Table (2)'[SlicerColumn2] )
            = CALCULATE (
                DISTINCTCOUNT ( 'Table (2)'[SlicerColumn2] );
                ALL ( 'Table (2)'[SlicerColumn2] )
            );
        1;
        0
    )
RETURN
    IF ( slicer1 + slicer2 = 1; blank; [Budget])

 

 

 

Add a slicer setting per each slicer and keep adding +  for each variable.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @tobiasmcbride ,

 

My error the formula should be:

 

Budget = IF (DistinctCount(Table[SlicerColumn]) = CALCULATE (DistinctCount(Table[SlicerColumn]);ALL(Table[SlicerColumn]))) ; [BudgetMeasure]; Blanks())

 

Sorry for the mistake 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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