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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Infidti
Frequent Visitor

DAX help

What I am looking to do is when the slicer for date is selected my calculation looks at dates leading up to it including it to work out the QTR up to that date. The following calculation doesn't work;

 

LastQuarter_PCT = 

CALCULATE(

    AVERAGE(YourTable[YourValueColumn]), 

    FILTER(

        ALL(YourTable[Date]), 

        YourTable[Date] = MAX(YourTable[Date]) &&

        YourTable[Date] >= STARTOFQUARTER(MAX(YourTable[Date]), 0) &&

        YourTable[EndDate] < STARTOFQUARTER(MAX(YourTable[Date]), 1)

    )

)

 

Any advice be great.

1 REPLY 1
Tahreem24
Super User
Super User

@Infidti It would be great if you could share the sample input data (not the real data) along with expected output.

 

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

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.