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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
AlmantasPBIguy
Frequent Visitor

Filtering Current + last quarter

Hey guys,

I am trying to display brand awareness, of various brands current quarter TD vs last quarter in a clustered column chart.

AlmantasPBIguy_0-1648023872443.png

I can't finda way, how to filter out current and previous quarters only. Any suggestions?

 

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

Hi, @AlmantasPBIguy ;

You could create a flag column in table.

flag = 
var _to=TODAY()
return IF(YEAR([Date])=YEAR(_to)&&QUARTER([Date])=QUARTER(_to),1, 
          IF(QUARTER(_to)=1,IF(YEAR([Date])= YEAR(_to)-1&&QUARTER([Date])=4,1),IF(QUARTER([Date])=QUARTER(_to)-1,1)))

Then apply it in all page filter.

vyalanwumsft_0-1648451776422.png

The final output is shown below:

vyalanwumsft_1-1648451911057.png

 


Best Regards,
Community Support Team _ Yalan Wu
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

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @AlmantasPBIguy ;

You could create a flag column in table.

flag = 
var _to=TODAY()
return IF(YEAR([Date])=YEAR(_to)&&QUARTER([Date])=QUARTER(_to),1, 
          IF(QUARTER(_to)=1,IF(YEAR([Date])= YEAR(_to)-1&&QUARTER([Date])=4,1),IF(QUARTER([Date])=QUARTER(_to)-1,1)))

Then apply it in all page filter.

vyalanwumsft_0-1648451776422.png

The final output is shown below:

vyalanwumsft_1-1648451911057.png

 


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks, this helped me out!

amitchandak
Super User
Super User

@AlmantasPBIguy , Measure using date table and TI

 

QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))

 

 

based on today

 

QTD Today=
var _month = mod(month(Today()),3)
var _min = date(year(today()),month(Today()) -1* if(_month=0,3,_month) ,1)
var _day = today()
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _day) )

LQTD Today=
var _month = mod(month(Today()),3)
var _min = eomonth(date(year(today()),month(Today()) -1* if(_month=0,3,_month) ,1),-4)+1
var _day = date(year(today()), month(today()) -3 , day(today()))
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _day) )

 

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

Thank you, bur this does not work  for me, because I need to compare current quarter and last quarter brand by brand. All I need is a way to filter this quarter and last quarter on the page level. Perhaps a true/false column that returs true if it is current or last qtr? 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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