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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MRensenSDR
Regular Visitor

Replace 'No number' with a 0 in a sumx measure

Hi there!

 

Is it possible to replace the following "no number" value with a zero? 

PBI.PNG

 

I am using this DAX formula in the measure (third column)

Gemiddeld gecalculeerd uurloon = SUMX('Projectenbeheer', (('Projectenbeheer'[Kosten gecalculeerde uren] / 'Projectenbeheer'[Aantal uur gecalculeerd])))

Because 0 can't be divided by 0 I get this "no number" value returned. Because of these rows the total at the bottom isn't working. Does anyone perhaps know how to avoid this issue? Thanks!
 
3 ACCEPTED SOLUTIONS
DataZoe
Employee
Employee

@MRensenSDR You can resolve this I think with using the DIVIDE DAX funciton:

 

Gemiddeld gecalculeerd uurloon =
SUMX (
    'Projectenbeheer',
    DIVIDE (
        'Projectenbeheer'[Kosten gecalculeerde uren],
        'Projectenbeheer'[Aantal uur gecalculeerd],
        0
    )
)

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

sayaliredij
Super User
Super User

HI,

 

Instead of '/' sign you can use DIVIDE function which handles 0 divider out of the box

 

Thanks,

Sayali 

 

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

jdbuchanan71
Super User
Super User

@MRensenSDR 

Try it with a DIVIDE and 0 for the 3rd condition.

Gemiddeld gecalculeerd uurloon =
SUMX (
    'Projectenbeheer',
    DIVIDE (
        'Projectenbeheer'[Kosten gecalculeerde uren],
        'Projectenbeheer'[Aantal uur gecalculeerd],
        0
    )
)

View solution in original post

4 REPLIES 4
MRensenSDR
Regular Visitor

Thanks for all the quick replies! I should've known this... Thanks for all the quick help!

jdbuchanan71
Super User
Super User

@MRensenSDR 

Try it with a DIVIDE and 0 for the 3rd condition.

Gemiddeld gecalculeerd uurloon =
SUMX (
    'Projectenbeheer',
    DIVIDE (
        'Projectenbeheer'[Kosten gecalculeerde uren],
        'Projectenbeheer'[Aantal uur gecalculeerd],
        0
    )
)
sayaliredij
Super User
Super User

HI,

 

Instead of '/' sign you can use DIVIDE function which handles 0 divider out of the box

 

Thanks,

Sayali 

 

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




DataZoe
Employee
Employee

@MRensenSDR You can resolve this I think with using the DIVIDE DAX funciton:

 

Gemiddeld gecalculeerd uurloon =
SUMX (
    'Projectenbeheer',
    DIVIDE (
        'Projectenbeheer'[Kosten gecalculeerde uren],
        'Projectenbeheer'[Aantal uur gecalculeerd],
        0
    )
)

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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