Forum Discussion

x0's avatar
x0
Helper I
2 years ago
Solved

Measure calculation divide function not work

Hello Everyone ,      I have created 3 simple measure , unfortunatley from 3 of 2 is working and 1 is not work well anyone have any suggestion ?  here i am sharing 3 measure . with that i also sh...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi x0 ,

     

    Create a measure that outputs the numerator and denominator separately.

    DebugNameCountRatio = 
    "Numerator: " & FORMAT([Total Name Count], "General Number") & 
    ", Denominator: " & FORMAT([Total Move insq percent], "General Number")

     

    Drag and drop the DebugNameCountRatio onto the card visual object on the report page to display it, to determine if the numerator and denominator are the same.

     

    I also did some testing, maybe that helps:

     

    I have the following DAX expressions, the first three are measures and the last two are calculated columns.

    Measure = SUM('Table'[value])
    
    Measure 2 = DIVIDE(MAX('Table'[value]),SUM('Table'[value]))
    
    Measure 3 = DIVIDE(MAX('Table'[value]),[Measure])
    
    Column = DIVIDE('Table'[value],[Measure])
    
    Column 2 = DIVIDE('Table'[value],SUM('Table'[value]))

     

    Only Column2 is calculated correctly.

     

    You can try replacing measure with calculated column and do not include measures in the calculated columns, and you can copy the logic of measures to the parameter part of the DIVIDE function.

     

    I would be grateful if you could provide me with sample data for testing, please remove any sensitive data in advance.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!