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
shubhamone8
New Member

Get data for a week before considering TODAY()

Hello People,
I am working on a dataset wherein I have Date, Category, Client Name, & Values as Columns,
Date is upto January to December, & i have added Week name column in this to get the week wise bifurcation, Values is updated once weekly, I want to search  previous week, everyday and in which day the data is loaded , I want previous week that day data from today to be fetched.

I.e. Today is 04/04/2024 then my dataset will be having date from all 7 days but data will be present only in 1 day.

could anyone give me some advice on the way to do that in power query/ dax measure?

Thanks !!!

1 REPLY 1
Uzi2019
Super User
Super User

Hi @shubhamone8 

try this below dax. 

Uzi2019_0-1711968097444.png

 

 

lastupdated =
var A= WEEKNUM(TODAY())
var b= CALCULATE(SUM(Cat[Values]), FILTER(Cat, MAX(Cat[Weel])=A))
Return b
 
 I hope this would resolves your issue!
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.