Forum Discussion
jorge_oliveira
Helper I
4 years agoFilter measures
Hello, I'm relatively new to Power BI. I'm stuck with a formula for some time now so any help would be appreciated. Is it possible to filter a measure with a number selected in a slicer and then...
- 4 years ago
Try these 2 measures:
Measure 1 = Var _Y = SELECTEDVALUE('Table'[Year]) Var _M = SELECTEDVALUE('Table'[Month]) return CALCULATE(SUM('Table'[Value]),filter(ALLEXCEPT('Table','Table'[Products]),'Table'[Year]=_Y&&'Table'[Month]=_M))Measure 2 = Var _Y = SELECTEDVALUE('Table'[Year]) Var _M = SELECTEDVALUE('Table'[Month]) return CALCULATE(SUM('Table'[Value]),filter(ALLEXCEPT('Table','Table'[Products]),'Table'[Year]=_Y&&'Table'[Month]<=_M))output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/