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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
xetler
New Member

Resultado infinito

Buenas tardes,

Tengo la siguiente tabla. En ella necesito que me calcule el % en cada una de las filas sobre el total de las prestaciones de servicios.

 

xetler_2-1685114640613.png

 

He realizado dos medidas: 

La primera es la siguiente, para aislar por decirlo de alguna manera, las ventas:

 

xetler_0-1685114514095.png

Donde el 705 es la cuenta contable donde se engloba todas las ventas.

Y la segunda es la siguiente para llevarla al modelo y calcular el % en cada una de las filas:

 

xetler_1-1685114589054.png

Es curioso que me salga bien al calcular el resultado de explotación, en la prestación de servicios (que es 100% al ser el mismo importe), y en resultado del ejercicio.

Pero en el resto de filas me pone infinito. Y no hay ceros, ya que hay importes en el saldo de cuentas de cada una de las filas.

Y si incluyo la orden DIVIDE me aparece en vez de infinito 0.

Alguna idea???

Muchas gracias!

 

 

 

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @xetler ,

 

In DAX, you can use the IFERROR function to replace the infinite value with another value. The IFERROR function takes two arguments: the first argument is the expression that you want to evaluate, and the second argument is the value that you want to return if the expression evaluates to an error.

Here's an example of how you can use the IFERROR function to replace the infinite value with 0:

=IFERROR(DIVIDE(numerator, denominator), 0)

In this example, the DIVIDE function is used to divide the numerator by the denominator. If the result of the division is infinite, the IFERROR function will return 0 instead.

You can replace the 0 with any other value that you want to return if the expression evaluates to an error.

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

Hi Stephen!

Thanks, but it is not the solution that I need.

The result that I need would be based on the following division:

190690,23 / 2415628,50     7,89% (ok)

2415628,50 / 2415628,50   100,00% (ok)

-596413,05 / 2415628,50   24,69% (and not "-infinito")

.......

Thanks,

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors