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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Neu_BI
Regular Visitor

Dax for tooltip measure to ignore filters

I am using a simple data model with a single 'table' that has a row for each individual [student_ID], the [unit_name] that they are studying, and their [study_status]. The table also has a field for the [year_of_study], but I am not using a separate date table. 

 

I have a stacked bar chart visual which uses a measure for distinctcount of [student_ID] as the value, with the [unit_name] on the y-axis, and the [study_staus] as the legend. The visual is filtered to show only one particular [year_of_study]

 

I would like to use a report-page tooltip to show a yearly trend for the count of [student_ID] for a particular [unit_name], but for all [years_of_study], and all [study_status] i.e. another stacked bar chart with [study status] as the legend that retains the filter for the [unit_name] that the tooltip hovers over, but ignores the filter for the [year_of_study].

 

Can anyone help me with a DAX measure that I could use on the report page tooltip to achieve this? Thanks!

2 REPLIES 2
Neu_BI
Regular Visitor

Hi @v-kalyj-msft

 

PREVIEW
What I meant was a tooltip with a stacked bar chat that has [year of study] on the axis and [study status] on the legend. It should retain the filter for the [unit name] that is hovered over in the primary visual, but ignore the filters on [year of study] and [study status].
 
I've actually found a solution that achieves my goal but it has involved me complicating the data model somewhat by using separate look up tables for [study status] and [year of study]. I'm sure that a more elegant and efficient solution is possible, however.
 
 
Data model snip.PNG
 The DAX for the tooltip measure that I used is:
 
ToolTip Measure =
CALCULATE( DISTINCTCOUNT'Table' [student_ID]),
ALLEXCEPT( Date_Table, Date_Table [Year]),
ALL( 'Study_Status' [Study Status])
)
 
Thanks for your time spent considering this.
v-yanjiang-msft
Community Support
Community Support

Hi @Neu_BI ,

According to your description, I create a sample.

vkalyjmsft_0-1653294342488.png

vkalyjmsft_1-1653294372758.png

But I'm not very clear about what "yearly trend for the count of [student_ID]" means, could you please explain more with the example.

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors