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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Employee
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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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