Forum Discussion

ryanjparks's avatar
ryanjparks
Icon for Helper I rankHelper I
3 years ago
Solved

DAX Help with Filtered SUM (Slicer)

Hey everyone, first time poster here. I am new to Power BI and am in need of some help.   It seems that this should be an easy task, but I have been unsuccessful so far and havent been able to fi...
  • rautaniket0077's avatar
    3 years ago

    Relate your Data with mine.

    Use these two below measures
    1) 

    Total Sales  =
    CALCULATE(
        SUM(Orders[Sales]),
        ALLEXCEPT(Orders,Orders[Customer Name])
    )

    2) 
    Selected Sales =
    Var a = SELECTEDVALUE(People[Region],0)
    Var b =
    CALCULATE(
        [Total Sales],
        FILTER(People,
        People[Region] = a
        )
    )

    return b+0

    3) I have used customer name in the table, showing total sales and selected sales based on the value selected in slicer(in slicer i have put region from people table)

     

    please accept my answer as solution if it solves your issue.