Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

DAX expression aggregation

Hello community,   I am working with daily records stored mostly as durations in seconds. I am using DAX to DIVIDE numerators and denominators to return percentage values. Once I put these values i...
  • v-zhangti's avatar
    4 years ago

    Hi, Anonymous 

     

    You can try the following methods.

    Column:

    value = IF([numerator]=0,0,DIVIDE([numerator],[denominator]))

    Measure:

    Measure =
    IF (
        HASONEVALUE ( 'Table'[report_date] ),
        SUM ( 'Table'[value] ),
        DIVIDE ( SUM ( 'Table'[numerator] ), SUM ( 'Table'[denominator] ) )
    )
    

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

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