cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Question on a What If Scenario

Hello all...

 

I created a What If parameter and named it "% Price Change." It created the below table and measure:

 

% Price Change = GENERATESERIES(-50, 50, 1)
% Price Change Value = SELECTEDVALUE('% Price Change'[% Price Change], 1)
 
With the slider that's automatically created, I am trying to calculate the impact on Net Sales given % changes
in price with the below measure, and then pull that value in to a clustered column chart to compare it to original Net Sales:
 
Net Sales after % Price Increase = SUM('Item Sales'[Net Sales]) + SUM('Item Sales'[Price])
* '% Price Change'[% Price Change Value]/100
 
Net Sales and Price are columns with a fixed decimal number format that have a Sigma character in
front of them in the Fields list and the the % Price Change Value is the measure that was generated
when I created the What If parameter.
 
However, the calculation is 5k dollars lower than it should be when comparing it to a test calculation
that I perform in the source data. If relevant, the number I'm looking for is $307k and the measure is
returning $302k.
 
Does anything within the code jump out at as being incorrect?
 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper V
Helper V

Re: Question on a What If Scenario

Hi and thank you. I think I figured it out. This code looks to be working:

 

Revenue after % Price Change =
SUMX('Item Sales','Item Sales'[Net Sales])
+ SUMX('Item Sales','Item Sales'[Qty] * 'Item Sales'[Price]
* '% Price Change'[% Price Change Value]/100)

 

Date            Item   Qty    Gross Sales  Discounts  Net Sales Unit   Price
7/20/2019   1        9        $45.00         ($9.00)       $36.00      ea      $5.00
9/21/2019   2        8        $40.00         ($8.00)       $32.00      ea      $5.00

View solution in original post

4 REPLIES 4
Highlighted
Resolver V
Resolver V

Re: Question on a What If Scenario

I think your measure is not correct. It should be

 

Net Sales after % Price Increase = SUM('Item Sales'[Net Sales]) + SUM('Item Sales'[Net Sales])
* '% Price Change'[% Price Change Value]/100
 
You must have lines in Item Sales with more than one position, therefore your value is lower, than it should be.
 
Highlighted
Helper V
Helper V

Re: Question on a What If Scenario

Thank you. I tried that as well and while it brings me closer, it's still a few hundred dollars off. I may be overthinking things, but I tested the measure results by going in to the source data, changing the prices by 10%, and then multiplying the new prices by the quantitites instead of just multiplying Net Sales by 10%.

Highlighted
Community Support
Community Support

Re: Question on a What If Scenario

Hi @bchager6 ,

Can you please share some sample data and expected the result for test? It will help us clarify your scenario.

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper V
Helper V

Re: Question on a What If Scenario

Hi and thank you. I think I figured it out. This code looks to be working:

 

Revenue after % Price Change =
SUMX('Item Sales','Item Sales'[Net Sales])
+ SUMX('Item Sales','Item Sales'[Qty] * 'Item Sales'[Price]
* '% Price Change'[% Price Change Value]/100)

 

Date            Item   Qty    Gross Sales  Discounts  Net Sales Unit   Price
7/20/2019   1        9        $45.00         ($9.00)       $36.00      ea      $5.00
9/21/2019   2        8        $40.00         ($8.00)       $32.00      ea      $5.00

View solution in original post

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors