Forum Discussion
DAX : Filter issue
- 10 years ago
Do you need to use FILTER ?
This works for me. And it ignore filters when made
Sales14 = CALCULATE(sum (SalesDetail[Sales Value £]), CalendarInv[Year] = 2014)
whereas using if doesn't. And filter doens't as well
So, what it sounds like you want is your Measure coupled with a Matrix visualization. So, select your Product, Month and Measure and then select Matrix. Put your Product and Month in Rows and your Measure in Values. This should give you the effect that you are looking for if I understand what you are looking for.
thank you
off course it's possible to use a matrix, like we do in Excel.
But what I want is create a measure TotalSalesExceptOthers, and this measure will be used in differents visualisations, such as
basic-area-chart https://support.powerbi.com/knowledgebase/articles/653149-tutorial-basic-area-chart
and for creating other measure. for example the rate : SalesExceptOthers/TotalSales etc
It is a basic request : i guess everybody wants to have a filtered measure (in order to exclude data). But CALCULATE(SUM('Table1'[Sales]);FILTER(ALL('Table1'[RevenueType]);'Table1'[RevenueType]<>"others")) is a cumulative formula
- RJ10 years agoResolver II
Do you need to use FILTER ?
This works for me. And it ignore filters when made
Sales14 = CALCULATE(sum (SalesDetail[Sales Value £]), CalendarInv[Year] = 2014)
whereas using if doesn't. And filter doens't as well
- konstantinos10 years agoMemorable Member
Depends how you use the filters in order to be a cumulative formula.Try not to use ALL inside FILTER..
- readyOH10 years agoFrequent Visitor
yes thanks RJ and konstantinos
Without using FILTER, it is not cumulative
so my formula becomes
CALCULATE(SUM('Table1'[Sales]);'Table1'[RevenueType]<>"others"))