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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Tell DAX to respect the current filter context

Hello Guys,

 

We are using the COVID Data Set here to get the countries with popluation more than 50 million or 5 Cr ( India ) and the people vaccinated for that particular country.

 

So we created the measure to find the previous day for the latest date in the data set and filter the population to greater or equal to 50 million and used the table visual. 

 Snap1.JPG

 

The measure works how we need it to and now  we  want to drag the "people vaccinated" column to the visual and expect it to respect the current filter context and only show us the data for the mentioned countries but as we drag the "people vaccinated" column in the visual we get the following 

 

Snap2.JPG

 

So if you see the above image , we also get the countries where the population is less than 50 million, we don't want that ,  just want Dax to give us the current filter context which is present on the visual.

 

How can we do that?

Thanks in advance

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

In this case your issue is with the fact that columns and filters impact the context of a measure, but a measure does not impact the context of a column.

 

Meaning that if you add a column to a visualization where you have a measure that is filtered that filter in the measure does not impact the column values this is because the measure is not a value in the database is calculated on the moment is called.

 

In this case you need to do one of two things or create a measure with the sum of the vacinated that are higher than the 50M or filter the visualization directly by that column.


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

1 REPLY 1
MFelix
Super User
Super User

Hi @Anonymous ,

 

In this case your issue is with the fact that columns and filters impact the context of a measure, but a measure does not impact the context of a column.

 

Meaning that if you add a column to a visualization where you have a measure that is filtered that filter in the measure does not impact the column values this is because the measure is not a value in the database is calculated on the moment is called.

 

In this case you need to do one of two things or create a measure with the sum of the vacinated that are higher than the 50M or filter the visualization directly by that column.


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