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
Anonymous
Not applicable

Calculated measure not being allowed to have a "visual level filter" applied

Hello,

 

I've created a few measures to calculate a metric showing the prior year and a trailing last year (from the last completed month).  However, when I go to visualize these, using a visual level filter doesn't limit the data correctly on one of the measures.

 

Here are the 2 measures:

 

Cost Per Pound Prior Year = CALCULATE([Cost Per Pound],USERELATIONSHIP('tms_dw aym_invoiced_all'[master date],DateKey[Date]),DATEADD(DateKey[Date],-12,month))

 

Cost Per Pound Last Year Rolling = CALCULATE([Cost Per Pound],USERELATIONSHIP('tms_dw aym_invoiced_all'[master date],DateKey[Date]),DATESINPERIOD(DateKey[Date],EOMONTH(lastdate(DateKey[Date]),-1),-12,month))

 

Here is the result:

If I only include the Cost Per Pound Prior Year metric, then I can apply the visual level filter to only show the last 12 calendar months (using the DateKey[Date] field).  However, if I include both, then the visual level filter doesn't properly filter.

 

Capture 1.PNGCapture 2.PNG

 

Any help would be greatly appreciated.

Seth

 

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

Instead of time intelligence function, you could try to implement a custom DAX formula.

https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks Sam, but shouldn't the time intelligence functions work properly?  The values are correct, but why won't it allow the visual level filter to apply properly?  

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