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! Request now

Reply
JothiG
Helper II
Helper II

Dax -tooltip screen not slicer filter value

I have synced slicers between main visual and tooltip visual. but sync not working for tooltip visual . below is my dax and screen shot

2_1_difference =
VAR _yr = MAX('yarn data'[Stock_finyear])
var _month_max = CALCULATE(MAX('yarn data'[month_sorter]), FILTER(all('yarn data'),
'yarn data'[Stock_finyear] = _yr))

var _month= SELECTEDVALUE('yarn data'[month_sorter])

var _month_calc = if (ISBLANK(_month),_month_max,_month)


var cur_mon_val = CALCULATE(
    SUM('yarn data'[value]),
     FILTER(all('yarn data'),
     'yarn data'[Stock_finyear] = _yr &&
     'yarn data'[month_sorter] =_month_calc
    ))
var Pre_mon_val = CALCULATE(
    SUM('yarn data'[value]),
    FILTER(all('yarn data'),
     'yarn data'[Stock_finyear] = _yr-1 &&
     'yarn data'[month_sorter] =_month_calc
    ))
var val_diff = cur_mon_val -  Pre_mon_val


RETURN
 if(Pre_mon_val <> 0 ,cur_mon_val-Pre_mon_val ,0)

 

JothiG_0-1757583626558.png

 

1 ACCEPTED SOLUTION
sivarajan21
Post Prodigy
Post Prodigy

Hi @JothiG 

 

Instead of ALL('yarn data'), scope your calculation only to the level you want to override.
For example, if you want to ignore only some columns but still respect slicers, use ALLSELECTED() or REMOVEFILTERS()

Try this 

2_1_difference =
VAR _yr = MAX('yarn data'[Stock_fynear])
VAR _month_max =
    CALCULATE (
        MAX ( 'yarn data'[month_sorter] ),
        FILTER (
            ALLSELECTED ( 'yarn data' ),
            'yarn data'[Stock_fynear] = _yr
        )
    )
VAR _month = SELECTEDVALUE ( 'yarn data'[month_sorter] )
VAR _month_calc = IF ( ISBLANK ( _month ), _month_max, _month )

VAR cur_mon_val =
    CALCULATE (
        SUM ( 'yarn data'[value] ),
        'yarn data'[Stock_fynear] = _yr,
        'yarn data'[month_sorter] = _month_calc
    )

VAR Pre_mon_val =
    CALCULATE (
        SUM ( 'yarn data'[value] ),
        'yarn data'[Stock_fynear] = _yr - 1,
        'yarn data'[month_sorter] = _month_calc
    )

RETURN
    IF ( Pre_mon_val <> 0, cur_mon_val - Pre_mon_val, 0 )

 

Please let me know if it works

Best Regards,

View solution in original post

3 REPLIES 3
sivarajan21
Post Prodigy
Post Prodigy

Hi @JothiG 

 

Instead of ALL('yarn data'), scope your calculation only to the level you want to override.
For example, if you want to ignore only some columns but still respect slicers, use ALLSELECTED() or REMOVEFILTERS()

Try this 

2_1_difference =
VAR _yr = MAX('yarn data'[Stock_fynear])
VAR _month_max =
    CALCULATE (
        MAX ( 'yarn data'[month_sorter] ),
        FILTER (
            ALLSELECTED ( 'yarn data' ),
            'yarn data'[Stock_fynear] = _yr
        )
    )
VAR _month = SELECTEDVALUE ( 'yarn data'[month_sorter] )
VAR _month_calc = IF ( ISBLANK ( _month ), _month_max, _month )

VAR cur_mon_val =
    CALCULATE (
        SUM ( 'yarn data'[value] ),
        'yarn data'[Stock_fynear] = _yr,
        'yarn data'[month_sorter] = _month_calc
    )

VAR Pre_mon_val =
    CALCULATE (
        SUM ( 'yarn data'[value] ),
        'yarn data'[Stock_fynear] = _yr - 1,
        'yarn data'[month_sorter] = _month_calc
    )

RETURN
    IF ( Pre_mon_val <> 0, cur_mon_val - Pre_mon_val, 0 )

 

Please let me know if it works

Best Regards,

grazitti_sapna
Super User
Super User

Hi @JothiG , 

Slicers do sync their filters to tooltips, because tooltips inherit the same filter context as the visual. But if you want slicer selections to be explicitly visible in the tooltip for that I need more details around the same. 

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.

💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.

🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.

🔗 Curious to explore more? [Discover here].

Let’s keep building smarter solutions together!

MFelix
Super User
Super User

Hi @JothiG ,

 

You do not need to have the slicers on the tooptip page since the filter context is passed trough the tooltip and everything gets filtered properly.

 

What is the exact purpose that you want to achieve with the tooltip? In your print I cannot perceive from what visual you are showing the tooltip.


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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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