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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
JohannSteyn
Frequent Visitor

Storing a calculated average value as a constant to use in future dated calculations

Hi all,

I have a calculation to calculate the average % of orders that are cancelled over the last 3 months (see below).

JohannSteyn_0-1640101080966.png

 

Let's say this number is 30%.

I want to use this 30% and apply it to the future orders that have been placed to estimate how many will be cancelled.

 

However, when I write the following DAX code, then the measurement is only applying the calculation on the last 90 days and not using the 30% as a constant in the future. How can I change this?

JohannSteyn_0-1640101506160.png

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@JohannSteyn , Can you add all('Collection table') in the filter first var. If needed need add filter do same in second var too

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
JohannSteyn
Frequent Visitor

@amitchandak sorrry I made such a stupid mistake. Here's the corrected version if it will help anyone:

JohannSteyn_0-1640157869608.png

Thank you for the help

 

amitchandak
Super User
Super User

@JohannSteyn , Can you add all('Collection table') in the filter first var. If needed need add filter do same in second var too

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 thank you for the reply.

Unfortunately I am getting this error below - any idea what I should change?

JohannSteyn_0-1640109722100.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors