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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

undefined

I am trying to calculate values for the previous week. Currently I am getting the values I want however my measure is not being filtered by any of the slicers that I choose. Below is my measure and results. 

 

Measure Created

 

.Test_Registrations PW =
CALCULATE([.Registrations],FILTER(All(vw_PBI_DEVELOPER_JOURNEY_REGISTRATION),vw_PBI_DEVELOPER_JOURNEY_REGISTRATION[.WeekNumber] = SELECTEDVALUE(vw_PBI_DEVELOPER_JOURNEY_REGISTRATION[.WeekNumber]) - 1 &&
vw_PBI_DEVELOPER_JOURNEY_REGISTRATION[EVENT_YEAR] = SELECTEDVALUE(vw_PBI_DEVELOPER_JOURNEY_REGISTRATION[EVENT_YEAR])
))
 
Here are my results and this is what I want, However, None of my slicers are working expect the Year slicer.
The data is from one table and no relationships are needed. 
 
Last Week Metric.PNG
 
 
4 REPLIES 4
amitchandak
Super User
Super User

Can you remove all vw_PBI_DEVELOPER_JOURNEY_REGISTRATION and test

FILTER(All(vw_PBI_DEVELOPER_JOURNEY_REGISTRATION)
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Here I removed All, however, I did not get any data

 

 

Last Week Metric 2.PNG

 

Here I tried All Selected. I did get the proper results and I am also able to filter the data. 

The challenge here though, is now I am not showing any data for the first week in the matrix. Smh

 

Last Week Metric 3.PNG

All from the same table. Put all on week_number and event year at the start. and test.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

 

CALCULATE([.Registrations],FILTER(All(vw_PBI_DEVELOPER_JOURNEY_REGISTRATION[EVENT_YEAR]),All(vw_PBI_DEVELOPER_JOURNEY_REGISTRATION[WeekNumber]),vw_PBI_DEVELOPER_JOURNEY_REGISTRATION[.WeekNumber] = SELECTEDVALUE(vw_PBI_DEVELOPER_JOURNEY_REGISTRATION[.WeekNumber]) - 1 &&
vw_PBI_DEVELOPER_JOURNEY_REGISTRATION[EVENT_YEAR] = SELECTEDVALUE(vw_PBI_DEVELOPER_JOURNEY_REGISTRATION[EVENT_YEAR])
))

If this does not work, please provide a sample.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.