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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
ktg2019
Frequent Visitor

Removing a slicer interaction while still using the slicer value

In my report, a user will select a date using a date between slicer and we're only using the minimum date selected.

ktg2019_1-1736972801435.png

 

This date can be any day of the week. I want to show the sales numbers for the entirety of that week. For example, if a user selects a Wednesday, I want to show the values for Sunday through Saturday of that week. 

ktg2019_0-1736972743808.png

 

I have tried several remedies, but it seems like I either show the days leading up to the selected day or the days after the selected day-- I have not been able to see the entire week at once. 

 

One attempt of a calculation was 

CALCULATE(sum(*redacted sales table info*),ALL('vw_D_Date'[date_value]),FILTER(*redacted sales table*,[MinimumSelectedDate]))
 
where MinimumSelectedDate = FIRSTDATE('vw_D_Date'[date_value])

 

Any suggestions on how to solve this? 

1 ACCEPTED SOLUTION
v-yaningy-msft
Community Support
Community Support

Hi, @ktg2019 

You can try the following method to achieve your need.

vyaningymsft_0-1737013117118.png

vyaningymsft_1-1737013165984.png

 

Measure:

 

Sales = 
VAR _quarterSlicer = SELECTEDVALUE(Slicer[Quarter])
VAR _quarterSales = SELECTEDVALUE(Sales[Quarter])
VAR _yearSlicer = SELECTEDVALUE(Slicer[Year])
VAR _yearSales = SELECTEDVALUE(Sales[Year])

VAR _result = CALCULATE(SUM(Sales[Sales]),FILTER(Sales,_yearSales = _yearSlicer && _quarterSales = _quarterSlicer ))
RETURN
IF(_yearSales = _yearSlicer && _quarterSales = _quarterSlicer,1)

 

 

Best Regards,
Yang

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
sjoerdvn
Super User
Super User

Why not create a slicer with week numbers? Just add a column to your date dimension with year and weeknumber. You could also create a column for your slicer that includes the dates e.g "2025 WK1 (30-12-2024 - 05-01-2025).

 

 



v-yaningy-msft
Community Support
Community Support

Hi, @ktg2019 

You can try the following method to achieve your need.

vyaningymsft_0-1737013117118.png

vyaningymsft_1-1737013165984.png

 

Measure:

 

Sales = 
VAR _quarterSlicer = SELECTEDVALUE(Slicer[Quarter])
VAR _quarterSales = SELECTEDVALUE(Sales[Quarter])
VAR _yearSlicer = SELECTEDVALUE(Slicer[Year])
VAR _yearSales = SELECTEDVALUE(Sales[Year])

VAR _result = CALCULATE(SUM(Sales[Sales]),FILTER(Sales,_yearSales = _yearSlicer && _quarterSales = _quarterSlicer ))
RETURN
IF(_yearSales = _yearSlicer && _quarterSales = _quarterSlicer,1)

 

 

Best Regards,
Yang

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors