Forum Discussion

unknown917's avatar
unknown917
Icon for Helper IV rankHelper IV
8 months ago
Solved

Improper Sum with slicer

I have a table with shipping points, dates and total resources.  I have used measures to calculate the count of dates the sum of resources.   The expected result is to calculate the sum of resource...
  • cengizhanarslan's avatar
    8 months ago

    Please try the measure logic below:

    Total Res =
    SUM ( Fact[Total Resources] )
    
    Days =
    DISTINCTCOUNT ( Fact[Date] )
    
    Res/Days =
    VAR _perPoint =
        SUMX(
            VALUES( Fact[Shipping Point] ),
            DIVIDE(
                CALCULATE( [Total Res] ),
                CALCULATE( [Days] )
            )
        )
    RETURN
    _perPoint