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
selpaqm
Helper V
Helper V

Filter on Dynamic Rolling Average on Month Slicer

Hi All.

I have created below measure to reflects always 3 month figures when month slicer is used. 

 

3R =
CALCULATE(COUNT('Order'[Order/ not ordered]),DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-3,MONTH)))

 

However, when I try to add salesman figures with below formula, and click to month slicer it is directly show just choosen month figures not 3 months.

 

3R John =
CALCULATE(COUNT('Order'[Order/ notordered])
,DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-3,MONTH),FILTER('Order','Order'[Salesman]="John")))

 

below you may find a sample.

Sample.pbix 

1 ACCEPTED SOLUTION

@selpaqm , I have removed filter in these two formulae and move them in calculate and seem like they behave same now

3%R Martha = DIVIDE(
CALCULATE(SUM('Order'[Order/ not ordered]),DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-3,MONTH),'Order'[Salesman]="Martha"),
CALCULATE(COUNT('Order'[Order/ not ordered]),DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-3,MONTH),'Order'[Salesman]="Martha"))

3%R John = DIVIDE(
CALCULATE(SUM('Order'[Order/ not ordered]),DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-3,MONTH),'Order'[Salesman]="John"),
CALCULATE(COUNT('Order'[Order/ not ordered]),DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-3,MONTH),'Order'[Salesman]="John"))

 

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

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@selpaqm , What is the expected value? Both table seem to have  same values

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

@amitchandak when click any month "working" table values are change and correct and also matching with below one but "not working properly" table start to show just clicked months figures

@selpaqm , I have removed filter in these two formulae and move them in calculate and seem like they behave same now

3%R Martha = DIVIDE(
CALCULATE(SUM('Order'[Order/ not ordered]),DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-3,MONTH),'Order'[Salesman]="Martha"),
CALCULATE(COUNT('Order'[Order/ not ordered]),DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-3,MONTH),'Order'[Salesman]="Martha"))

3%R John = DIVIDE(
CALCULATE(SUM('Order'[Order/ not ordered]),DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-3,MONTH),'Order'[Salesman]="John"),
CALCULATE(COUNT('Order'[Order/ not ordered]),DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-3,MONTH),'Order'[Salesman]="John"))

 

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.