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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Slicer weekly

Hello, everybody,

 

I created weekly coin sales and showing this week and previous week coin sales. Now to see both week, we need to click two weeks in a slicer part.

But my customer wants to click just once on a filter choosing just one week, previous week appear automatically.

 

Is there any method to click just one and see with previous week cooin sales as well?

 

Thank you always.

 

이미지 2122.png

2 REPLIES 2
Anonymous
Not applicable

hi @Anonymous ,

 

Please use the below Dax formula to make new MEASURE to calculate last week sale.

 

lastWeek_Sales =
VAR WeekNum_LastWeek =
    WEEKNUM ( TODAY () ) - 1
RETURN
    CALCULATE (
        SUM ( 'table'[Sale] ),
        WEEKNUM ( 'Table'[Date] ) = WeekNum_LastWeek
    )

 

You can use this measure too show last week count when this week filter is selected.

 

 

do not hesitate to give a kudo to useful posts and mark solutions as solution.

 

Regards,

Gaurav Raj Singh 

LinkedIN : https://www.linkedin.com/in/gauravrajsingh/

 

Anonymous
Not applicable

Make a disconnected date table and use it in slicer.
Create weeknum column in your main table and date table.
And then create two seperate measures of this week and previous week and use it in your table visual.

This week sales count=Calculate(count([table,[col]),filter(table,table[weeknum]= min(date[weeknum])))
Similarly create for previous week by simply adding -1 at the end.



Thanks
Pravin

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.