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
lherbert501
Post Partisan
Post Partisan

Negative Growth with 0

Hi,

 

I have a scenario which is probably quite rare, but I need to have it covered in the if statement.

Where there was £0 Profit in the previous year, a product has made a loss on current reporting year.

 

lherbert501_0-1679669140043.png

 

Growth % =
switch( TRUE(),
                [Last YTD] = 0 && [Profit] > 0, 1.00,
                [Last YTD] = 0 && [Profit] < 0,  DIVIDE([YTD - LYTD],[Last YTD])
                ,0)

 

I'm struggling with where Last YTD is 0 and the following year is a negative. Ideally that would say -3.50% above in growth but as I'm dividing by zero its blank/0. 

 

Is this possible?

 

Thanks

 

 

3 REPLIES 3
lbendlin
Super User
Super User

Please read about the third argument of the DIVIDE function.

Hi @lbendlin ,

 

But even with an alternative result, it will return a value of etc 0.

 

I would want it to say -3.50% in the example above.

Then put that in there? Doesn't have to be 0.

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.