Forum Discussion

Prabunathan's avatar
Prabunathan
Frequent Visitor
8 years ago
Solved

Dynamic Filtering

Hi,   I have a situaiton, where in i have to extract the trasactions which happened due to a specific promotion ( example a Gift Voucher Promotion ). From the millions of transactions, i have to ge...
  • stretcharm's avatar
    stretcharm
    8 years ago

    Apologies I didn't read the examples.

    Is the Item code a load filter or a Slicer on all the data?

     

     If a slicer then add a measure like this and Filter by the slicer for Item code and  in the filter pane HasGV>0

    HasGV = 
    VAR GV = "GV100"
    RETURN
        CALCULATE (
            COUNT ( Trans[Transaction Id] ),
            FILTER (
                ALL ( Trans ),
                Trans[Transaction Id] = MAX ( Trans[Transaction Id] )
                    && Trans[Item Code] = GV
            )
        )