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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Make calculation react to date slicer

I have this expression, I want it to react to a slicer linked to Meetings'[Date]

Visited_Regions=DIVIDE( COUNTROWS(  INTERSECT( VALUES('Meetings'[Region]),  VALUES('Priorities'[Region]) ) ),  COUNTROWS(DISTINCT('Clinic priority'[Region])))

 

the result is a % - priorities do not change so it doesn't have a date column

 

could you help me?

3 REPLIES 3
Anonymous
Not applicable

Hi, @Anonymous 

 

Make sure the slicer is set to filter the table by . For guidance on setting up slicers, including date slicers, you can refer to the official documentation here:

 

Create a numeric or date range slicer in Power BI - Power BI | Microsoft Learn

 

Make sure that there is a relationship between the table and any other tables that need to be indirectly filtered by date selection. If the and tables need to react indirectly to the date slicer, consider how they relate to the tables in the model.


The formula used by the DAX formula should respect the filter context imposed by the slicer. However, make sure that there are no context conversion issues.


If the direct method doesn't work because of the missing date column in , consider creating a calculated table that aggregates priorities by date, or using measures to dynamically calculate the total priority as the denominator in the DIVIDE function, and then essentially respect the context of the slicer

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

Best Regards

Yongkang Hua

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

Anonymous
Not applicable

Hello. I am in a similar position again. I tried your approach and still couldn't manage. Here the new case: 

Totalattendedevents = CALCULATE( DISTINCTCOUNT('Eventregistration'[eventID]),   FILTER(  'Eventregistration',  'Eventregistration'[Attended] >= 1),  USERELATIONSHIP('Date'[Date], 'Eventregistration'[Date]))
I have a Many to one single relationship built between the 'Eventregistration'[date] and the 'Date'[Date], both have the date format as "short date". When the USERELATIONSHIP is not in the calculation, I see the total amount no matter the slicer (Date'[Date]), when I have it active, if I use the slicer, then I have 0. I have another table "meetings" with the date reacting correctly to the (Date'[Date]). So the final table needs to show me both the total meetings and the todtal events in the same time period. What am i doing wrong?  thank you
Anonymous
Not applicable

Thank you. I went a different way to reach my objective hence I didn't try your solution.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors