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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.