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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sam_gift
Helper I
Helper I

Couldn't make Prev QTR work when the slicer is selected

Hi,

 

I am not able to display Prev QTR measure, when one quarter is selected. If I select 2 quarters this is working. The formula is in below screenshot. Please help

 

sam_gift_0-1699932421381.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @sam_gift ,

I created some data:

vyangliumsft_0-1700103047828.png

 

Here are the steps you can follow:

1. Create measure.

Measure =
var _select=SELECTEDVALUE('Table'[Current Quarter])
var _currentquartermin=MINX(FILTER(ALL('Table'),[Current Quarter]=_select),[date_id])
var _lastquartermax=_currentquartermin-1
return
SUMX(
    FILTER(ALL('Table'),
    'Table'[date_id]>=DATE(YEAR(_lastquartermax),1,1)&&'Table'[date_id]<=_lastquartermax&&'Table'[Group]=MAX('Table'[Group])),[amount_reporting_curent])

2. Result:

vyangliumsft_1-1700103047830.png

 

If it doesn't meet your expected results, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Liu Yang

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

1 REPLY 1
Anonymous
Not applicable

Hi  @sam_gift ,

I created some data:

vyangliumsft_0-1700103047828.png

 

Here are the steps you can follow:

1. Create measure.

Measure =
var _select=SELECTEDVALUE('Table'[Current Quarter])
var _currentquartermin=MINX(FILTER(ALL('Table'),[Current Quarter]=_select),[date_id])
var _lastquartermax=_currentquartermin-1
return
SUMX(
    FILTER(ALL('Table'),
    'Table'[date_id]>=DATE(YEAR(_lastquartermax),1,1)&&'Table'[date_id]<=_lastquartermax&&'Table'[Group]=MAX('Table'[Group])),[amount_reporting_curent])

2. Result:

vyangliumsft_1-1700103047830.png

 

If it doesn't meet your expected results, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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