Forum Discussion

amit_wairkar's avatar
amit_wairkar
Frequent Visitor
5 years ago
Solved

Dividing with a count

Hi,   I have a column A which has an text data and column B which has Values. I want to check for a period of time the output.   eg - Delivery(value)/box(count) = Sum of column B / Count of Colum...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi amit_wairkar ,

    Please try to update the formula of your measure as below and check whether it can get your expected result.

    Measure = 
    VAR _sumofdelivery =
        CALCULATE ( SUM ( 'Table'[Delivery] ), ALLSELECTED ( 'Table' ) )
    VAR _countofbox =
        CALCULATE ( DISTINCTCOUNT ( 'Table'[Box] ), ALLSELECTED ( 'Table' ) )
    RETURN
        DIVIDE ( _sumofdelivery, _countofbox, 0 )

    If the above one still can't get the correct result, please provide some sample data with Text format and some screenshots that how the visual looks like when you applied the measure.... Thank you.

    Best Regards