Forum Discussion

KamK's avatar
KamK
Frequent Visitor
10 years ago
Solved

Dynamic Column calculation based on Slicer Selection

Hi Everyone   Im hoping someone can help me with this . Note - I have some experience using excel and have just started out learning DAX   Scenario -    I have the following Tables - Transact...
  • Eric_Zhang's avatar
    10 years ago

    KamK

     

    Calculated columns are initialized regardless of Slicers.

     

    If you'd like to filter your data via the selected value in a slicer, instead of a calcualted column, use a measure as below to filter in DAX.

     

    selectedValue =
    IF (
        ISFILTERED ( FILTERTABLE[Value] ) && HASONEVALUE ( FILTERTABLE[Value] ),
        LASTNONBLANK ( FILTERTABLE[Value], 0 ),
        "a default value"
    )