Forum Discussion

cruzp's avatar
cruzp
Icon for Helper V rankHelper V
3 years ago

Use DAX Measure as a Slicer

Hello Team,

 

I believe that slicier accepts only columns as input. By default I can't add measure to the slicer.

How do i create a workaround to have the below DAX as a filter/slicer?

I heard that it has something to do with creating a small table, "enter data" and applying filters using some dax functions like combination of switch and selected value.

 

But i don't know how to implement it. Please help.

 

Project Removed = IF(NOT(ISBLANK([Category Previous])) && [Category Current] = "Null" && 
([Category Previous] <> BLANK() || [Category Current] <> BLANK()), "✔", BLANK())
New to R4 = 
VAR AmountPreviousWeek = 
    CALCULATE(
        SUM(REP_REVENUE_R1_R4_SNAPSHOT[AMOUNT]),
        FILTER(
            REP_REVENUE_R1_R4_SNAPSHOT,
            REP_REVENUE_R1_R4_SNAPSHOT[SNAPSHOT_DATE_BK] = MAX('Previous Reporting Date'[Previous Reporting Date])
        )
)
RETURN IF(ISBLANK(AmountPreviousWeek) && [Category Previous] = "Null", "✔", BLANK())

 

Thanks!

 

5 Replies