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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jamie1989
Regular Visitor

YTD Sales Variance

Hello all!

 

New user to Power BI and currently working my way through learning!

 

I am stuck at waterfalls at the moment. I am following allow with this guide Create scatter, waterfall, and funnel charts - Learn | Microsoft Docs

 

Within here there is an example of how to use the waterfall, which in itself is easy to create. I am however stuck as so far they havent taught how to crease "YTD Sales Var" which i suspect is what i need to replicate the highs and lows represented in the video linked. As it stands I am seeing the following as I haven't been able to create a quick measure to show sales variance the way I have been reading.

 

Apologies, my DAX is still very early so now entirely sure how to write these myself confidentyl... You can see the data i want to sample is very basic.

Jamie1989_1-1639494781268.png

Jamie1989_0-1639494938376.png

 

 

Jamie1989_0-1639494748350.png

1 REPLY 1
v-chenwuz-msft
Community Support
Community Support

Hi @Jamie1989 ,

 

I think it's showing you how he created the waterfall chart. You are probably more concerned that you only have the green increase in your results and not the red decrease are you?

Actually, as long as the number given (the number entered into the chart, the value you put in Values) has a negative number, there will be a red drop.

As for the YTD sales variation, it means the total sales of the year minus the total sales of the previous year. So I wrote the following DAX for your reference.

YTD Sales Variance =
VAR _varp =
    CALCULATE(
        SUM( 'Sale'[revenue] ),
        FILTER( ALL( 'Date' ), [year] = SELECTEDVALUE( 'Date'[year] ) - 1 )
    )
VAR _varc =
    SUM( Sale[revenue] )
RETURN
    _varc - _varp

Result:

vchenwuzmsft_0-1639721815003.png

 

pbix at the end.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.