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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
AlejandroPCar
Helper IV
Helper IV

DIVIDE does not show the value

Hi!

 

 

I have these problem.

 

Im using DIVIDE and these is the result:

15.png

 

First I have two values for Eslovaquia in two dates and the result is right.

But in the second, I have only one value, because in that year that country (Etiopia) didnt import so the value is 0 and even the diference was -3.909,57 the formula DIVIDE does not show the change (-100%) and so on for other countries.

 

How can I fix that? Make DIVIDE show the value (100% or -100%) for those countries that just have values in one date.  

 

And I tried replacing in the formula the value BLANK() for 0 but it didnt fix the error because now it show me all the countries even those with both 0 values.

 

 

Thanks for read me!

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Hi @AlejandroPCar,

 

Did you mean the blanks? Maybe you could try to add one more parameter to "divide".

Exportaciones Variacion % =
DIVIDE ( [Diferencia]; [Exportaciones II]; 0 )

Best Regards!

Dale

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

View solution in original post

11 REPLIES 11
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @AlejandroPCar,

 

Would you like to try this? Maybe it could work.

Exportaciones Variacion % =
IF (
    [Exportaciones I] = 0;
    IF ( [Exportaciones II] = 0; BLANK (); -1 );
    IF (
        [Exportaciones II] = 0;
        BLANK ();
        DIVIDE ( [Exportaciones I]; [Exportaciones II]; 0 ) - 1
    )
)

Best Regards!

Dale

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

Hi,

 

Thanks for help me, but it dosent works, the result its the same I had.

Anonymous
Not applicable

@AlejandroPCar

 

Can you show us how your data is stored? By sample perhaps?

    

Hi, I hope it can help.

 

 

Help.png

 

 

 

 

 

 

Maybe I am oversimplifying, but can you just use the following, and format as a percentage in the Modeling tab?
Exportaciones Variacion % = DIVIDE ( [Diferencia]; [Exportaciones II] )

Hi @blopez11

 

I tried it and It works! (partially)

 

When the result is -100% it will be showed and it is perfect!

 

But, Im still having this problem:

 

help.png

 

 

 

Thanks a lot!

Hi @AlejandroPCar,

 

Did you mean the blanks? Maybe you could try to add one more parameter to "divide".

Exportaciones Variacion % =
DIVIDE ( [Diferencia]; [Exportaciones II]; 0 )

Best Regards!

Dale

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

Thank you! Problem solved!

Anonymous
Not applicable

Hi @AlejandroPCar

 

It's probably because you have blanks instead of zeros in your exportaciones columns. Try to replace blanks with zero in those columns.

Hi @Anonymous

 

Thanks for respond!

 

I dont have blanks in my exportaciones columns. Some years there are some countries and other years could be the same or others contries, but I dont have all countries all the years.

Anonymous
Not applicable

No problem.

 

I think you need to add some conditions to your calculations then. If exportaciones is blank, then it's dropped with 100 percent, and don't calculate if exportaciones is blank, because it will yield the result infinity.

 

You can try to show me your measure and how your data is stored. Then I can help you make the right measure.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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