Forum Discussion

PascalCL's avatar
PascalCL
Frequent Visitor
3 years ago
Solved

Prob with infinite

Hello everyone I apologize in advance for my Googel English 🙂   I have the following problem.   Vorschlag CT =         IF    (SUM('Sales invoices 2021/2022 (2)'[Quantity]) =0,         BLANK...
  • PabloDeheza's avatar
    3 years ago

    Hi there!

    Dividing by 0 will return "infinite" in Power BI using "/". What you should do is use DIVIDE function instead, where you can set an alternate result to return when dividing by zero.

    The measure would look like this:

    Vorschlag CT =
    IF(
    SUM('Sales invoices 2021/2022 (2)'[Quantity]) =0,
           BLANK(),
           DIVIDE( 
    SUM('Sales invoices 2021/2022 (2)'[Quantity]) - 'Item'[Theoretischer Vorrat], 
    SUM('Item'[Anz. / Paket])
    )
    )
    Let me know if that helps!
  • PabloDeheza's avatar
    PabloDeheza
    3 years ago

    Please mark my previous answer as a solution and then procced to create a new post with your new question. This way we help other users find solutions to their problems more easily.