Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Help with Dax

Hi team,

 

I am stuck with dax to calculate the total sum for a dealer sales for the promotional period. sample data is below.

 

end result required is for dealer 5032917 total sum would be $36000. 

There will be dealer sales after the end of promotionla period which is not requirted to be calculated. 

 

Thanks in advance.

 

DealerStartEndvalue
50329171/10/202221/10/2022$12,000
50329171/07/202328/07/2023$12,000
50329171/09/202215/09/2022$12,000

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Anonymous ,

     

    Calculated column.

    Column =
    SUMX(
        FILTER(ALL('Table'),
        'Table'[Dealer]=EARLIER('Table'[Dealer])),[value])

    measure.

    Measure =
    SUMX(
        FILTER(ALL('Table'),
        'Table'[Dealer]=MAX('Table'[Dealer])),[value])

    Result:

    Best Regards,

    Liu Yang

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

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

     

    Calculated column.

    Column =
    SUMX(
        FILTER(ALL('Table'),
        'Table'[Dealer]=EARLIER('Table'[Dealer])),[value])

    measure.

    Measure =
    SUMX(
        FILTER(ALL('Table'),
        'Table'[Dealer]=MAX('Table'[Dealer])),[value])

    Result:

    Best Regards,

    Liu Yang

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