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

Using dates in column as slicer

Hi, 

 

I have a table with Measures based on a slicer for transaction date (see screenshot). 

 

PBI Transactions.PNG

 

I now want to be able to have a seperate table with a week by week comparison of the measures calculated (see below): 

 

PBI Dates.PNG

 

In this table though it is only showing me the total of the measure calculated on the current date. 

 

Is there a simple way to do this? I'd also like to add other columns to this table based on other measures to calculate arrears. 

 

Thanks

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may create measures like DAX below.

 

This week = CALCULATE(SUM(Table[Amount]),FILTER(ALLSELECTED(Table),YEAR(Table[Date])=YEAR(Table[Date])&&WEEKNUM(Table[Date])=WEEKNUM(MAX(Table[Date]))))



Last week = CALCULATE(SUM(Table[Amount]),FILTER(ALLSELECTED(Table),YEAR(Table[Date])=YEAR(Table[Date])&&WEEKNUM(Table[Date])=WEEKNUM(MAX(Table[Date]))-1))



Diff= [This week]-  [Last week]

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may create measures like DAX below.

 

This week = CALCULATE(SUM(Table[Amount]),FILTER(ALLSELECTED(Table),YEAR(Table[Date])=YEAR(Table[Date])&&WEEKNUM(Table[Date])=WEEKNUM(MAX(Table[Date]))))



Last week = CALCULATE(SUM(Table[Amount]),FILTER(ALLSELECTED(Table),YEAR(Table[Date])=YEAR(Table[Date])&&WEEKNUM(Table[Date])=WEEKNUM(MAX(Table[Date]))-1))



Diff= [This week]-  [Last week]

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Refer, if my blog on week vs week can help

https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184


Appreciate your Kudos.

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
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!

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.

Top Solution Authors