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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dattron
Regular Visitor

DAX: Increasing Forecast by a certain percentage in different months

Hello, first time posting here!

 

I have been experimenting on how to increase current future forecast by a certain percantage. I have managed to do this in Power BI but only across all the months and by one % value. I did this by adding a slicer visualisation then created a measure that will take the base forecast multiple by the percentage which the user put using the slicer. 

 

I am now wondering whether it would be possible increase the forecast by different percentages for certain months. Please see below example in Excel that I want to replicate in Power BI.

 

dattron_2-1652864171054.png

Thanks

 

1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @dattron

there are several approaches to this, depending on your scenario. If you are the only user, you can create an excel-file with the modifications for each month, and create a relationship or lookup to get the modifications included in the measure. Or you can replace excel with "enter data" in power query and create the modifications there.


If you have report users who need to able to change the modifications, you can create a standalone table with values e.g. -50:50 for each month. Then create a slicer for each of these tables and write your measure like this:

Measure = 
var _s1 = (100 + CALCULATE(max('slicer month 1'[Value])))/100 return
var _s2 = (100 + CALCULATE(max('slicer month 2'[Value])))/100 return
switch(
    true(),
    CALCULATE(SELECTEDVALUE('Table'[month]))=1,SUM('Table'[value])*_s1,
    CALCULATE(SELECTEDVALUE('Table'[month]))=2,SUM('Table'[value])*_s2,
    SUM('Table'[value]))

 

Here is a mockup report I have created to highlight this: mockup 

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @dattron ,

 

If your original data is the same as it shown above, you will need to use unpivot feature to transform it as below:

Selecte [unit sold] and click "unpivot other columns".

vjaywmsft_0-1653298193755.png

Then create measures and create visual like below:

Measure = CALCULATE(MAX('Table'[Value]),FILTER('Table','Table'[units sold]="Base"))*(CALCULATE(MAX('Table'[Value]),FILTER('Table','Table'[units sold]="upleft"))+1)

Measure 2 = CALCULATE(MAX('Table'[Value]),FILTER('Table','Table'[units sold]="Base"))

vjaywmsft_1-1653298338575.png

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @dattron

there are several approaches to this, depending on your scenario. If you are the only user, you can create an excel-file with the modifications for each month, and create a relationship or lookup to get the modifications included in the measure. Or you can replace excel with "enter data" in power query and create the modifications there.


If you have report users who need to able to change the modifications, you can create a standalone table with values e.g. -50:50 for each month. Then create a slicer for each of these tables and write your measure like this:

Measure = 
var _s1 = (100 + CALCULATE(max('slicer month 1'[Value])))/100 return
var _s2 = (100 + CALCULATE(max('slicer month 2'[Value])))/100 return
switch(
    true(),
    CALCULATE(SELECTEDVALUE('Table'[month]))=1,SUM('Table'[value])*_s1,
    CALCULATE(SELECTEDVALUE('Table'[month]))=2,SUM('Table'[value])*_s2,
    SUM('Table'[value]))

 

Here is a mockup report I have created to highlight this: mockup 

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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