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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
AudRab
New Member

Apply percentage decrease at specific date in forecast

Hello everyone, 

 

I've been working on this problem for a couple of days and can't find a solution.

 

I have 3 tables:

  • Table1 with a number of "sales" from January to December 2021 by "product"
  • Table2 with "end of production date" + "consumers" (I'll get back to that later)
  • Table3 with a calendar (Date, year, month, quarter, etc.)

We want to forecast the monthly sales up to 2024. So I created a forecast with Table1 data.

However, we know that sometime between 2022 and 2023 at specific quarters some of the products will no longer exist. Each product has a specific number of consumers from 1 to 4. So I created a "Switch" measure in order to decrease by X% depending on the number of consumers (1 = -100%, 2=-50%, etc.)

 

Here is my problem: The % decrease in the forecast needs to be applied at a specific date (quarter) mentioned in Table2. Sometimes all at once, sometimes -50% at Qn1 and -50% at Qn2, etc.

 

I can't seem to find a way to apply my % decrease to my forecast at the specific date mentioned in Table2.

 

I hope this makes sense,

 

Thanks a lot for your help!

2 REPLIES 2
AudRab
New Member

HI @lbendlin 

 

Thank you for your answer,

 

Below is a sample of my data:

 

Table1 (monthly sales by product):

ProductJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember
1120023021573153320341043174529431576157313522485
2134425041579145029431542158315861632255315822296
3204424021733234924531423295316741573358215731583

 

Table2 (end of production + consumers):

ProductCustomersEnd or production quarter
1AQ2 2022
1BQ3 2022
2AQ1 2023
2CQ3 2022
2DQ1 2022
3BQ1 2022
3DQ2 2022

 

Table3: Date table

 

I pivoted table 1 to have a column with 'Month' and one with 'Value'

 

I have a forecast measure as below:

 

First Month = 

FIRSTNONBLANK(

ALL(Dates[Date]), 

CALCULATE(SUM(Table1[Value])))

 

Last Month =

LASTNONBLANK(

ALL(Dates[Date]), 

CALCULATE(SUM(Table1[Value])))

 

CAGR =

VAR _LastMonth = [Last Month]

VAR _FirstMonth = [First Month]

VAR _NoMonths = [Last Month] - [First Month]

RETURN

POWER(

DIVIDE(

CALCULATE(SUM(Table1[Value], Dates[Date] = _LastMonth),

CALCULATE(SUM(Table1[Value], Dates[Date] = _FirstMonth)

), 1 / _NoMonths

) -1

 

 

Forecast=
VAR _LastMonth = [Last Month]

VAR _NoMonths = SELECTEDVALUE(Dates[Date]) - [Last Month]

RETURN

IF(SELECTEDVALUE(Dates[Date]) >= _LastMonth,

CALCULATE(SUM(Table1[Value]),

Dates[Date] = LastMonth)

* POWER(( 1 + CAGR), _NoMonths))

 

And I have a SWITCH measure for my %decrease based on the total on customers:

 

Total Customers = 

CALCULATE(COUNT( Table2[Customers]))

 

Decrease% = 

SWITCH([Total Customers],

1, 0,

2, 0.5,

3, 0.334,

4, 0.25,

5, 0.2,

6, 0.167)

 

I figured I would multiply my Value by the number associated in the SWITCH measure (based on the total of customers per product).

 

Now where I'm stuck is applying this decrease to the forecast at each quarter specified in Table2 under 'End of Production Quarter'

 

I hope this makes sense,

 

Thanks again for your help

lbendlin
Super User
Super User

You can use CROSSJOIN and INTERSECT for that scenario.  Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Please show the expected outcome.

Helpful resources

Announcements
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.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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