Divide with Filter Context

Hi all,

Is there a way to apply filter context when using Divide?

I would like a Dax measure to Calculate the Hit Rate%: Sales Transaction / Traffic without Store type: SIS.

The expected result is Hit Rate = 4.2%

Thanks in advance for the assistance ! :grinning:

Data for reference:
data.csv (671 Bytes)

Current table

Desired Result

Regards
Hidayat

@Yatz86,

I think this gets you what you’re looking for:

Hit Rate Filtered = 
    CALCULATE([Hit Rate Divide], 
        FILTER(Sales, Sales[Store Type] <> "SIS")
    )

Full solution file posted below:

image

  • Brian

eDNA Forum - Hit Rate.pbix (39.4 KB)

Thanks @BrianJ for the solution!
Works like a charm! :grinning:

@Yatz86
One thing to remember is use the DIVIDE function and not “/”

@BrianJ
Here’s a situation where we could use KEEPFILTERS:
Keep%20Filters%20Example

Enterprise%20DNA%20Expert%20-%20Small

@Nick_M,

Can you please elaborate on that a bit? Still trying to wrap my head around exactly what KEEPFILTERS does and the benefit of using it here.

Thanks!

  • Brian

@BrianJ
Could you possibly start a new thread? I’ll be sure to answer and throw in some screenshots, but I dont want to clutter up this thread

Enterprise%20DNA%20Expert%20-%20Small