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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sreddy47652
Helper III
Helper III

Based on year selection to show previous quarter

Hi Team, I have directquery model and i need to show based on year selection on slicer i want show ouarter wise and  for example 2024 q1 should show value for 2023 Q4, if 2024 Q2 the value should show 2023 Q1 value like below. I need to show result like below query.

sreddy47652_0-1725978280272.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sreddy47652 ,

 

I’ve made a test for your reference:

1\I assume there is a table

vbofengmsft_0-1726219626811.png

 

2\Create a measure

 

NewSumOfValue =

 CALCULATE(

    MAX(Table1[Value]),

    REMOVEFILTERS(Table1),

    (Table1[Year] = (MAX(Table1[Year]) - 1) && Table1[Quarter] = 4) ||

    (Table1[Year] = MAX(Table1[Year]) && Table1[Quarter] = (MAX(Table1[Quarter]) - 1))

)

 

3\Result

vbofengmsft_1-1726219643712.png

 

vbofengmsft_2-1726219643713.png

 

 

Best Regards,

Bof

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @sreddy47652 ,

 

I’ve made a test for your reference:

1\I assume there is a table

vbofengmsft_0-1726219626811.png

 

2\Create a measure

 

NewSumOfValue =

 CALCULATE(

    MAX(Table1[Value]),

    REMOVEFILTERS(Table1),

    (Table1[Year] = (MAX(Table1[Year]) - 1) && Table1[Quarter] = 4) ||

    (Table1[Year] = MAX(Table1[Year]) && Table1[Quarter] = (MAX(Table1[Quarter]) - 1))

)

 

3\Result

vbofengmsft_1-1726219643712.png

 

vbofengmsft_2-1726219643713.png

 

 

Best Regards,

Bof

Tahreem24
Super User
Super User

  Try this DAX Measure:Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,Year)))

  

@sreddy47652

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Tahreem24  As i mentioned it's directquery mode and time intelligence functions will not work.

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.

Top Solution Authors