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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.