Forum Discussion

PBI_Rookie20's avatar
PBI_Rookie20
New Member
1 year ago
Solved

Dynamic and Encompassing Slicer

Hi, I am in need of assistance creating a dynamic slicer where a single Sale Name selection returns all other sales while the selected sale is in progress.  Here is an example of the raw data and des...
  • vicky_'s avatar
    1 year ago

    I created a new table with just the values of the Sales Names, and left it disconnected.

    Sale Names = VALUES('Table'[Sale Name])

    Then created the measure below:

    Sale Cost (Measure) = 
    var saleInProgressDates = CALCULATETABLE(VALUES('Table'[Sale In Progress]), TREATAS(VALUES('Sale Names'[Sale Name]), 'Table'[Sale Name]))
    RETURN CALCULATE(SUM('Table'[Sale Cost]), TREATAS(saleInProgressDates, 'Table'[Sale In Progress]))

    'Table' is the raw data you've provided, and  'Sale Names' is the table created above.

    Result below: