Forum Discussion

readyOH's avatar
readyOH
Frequent Visitor
10 years ago
Solved

DAX : Filter issue

Hi everyone,

 

I want to filter a field. For example, Total sales for every month except June

What I did :

CALCULATE(SUM('Table1'[Sales]);FILTER(ALL('Table1'[Month]);'Table1'[Month]<>"June"))

 

Great.... but it's a cumulative function.

 

How can I sum sales with filter without using the panel

filter

 

 

 

 

 

 

 

 

 

 

 

 

 

 

thanks

8 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Can you clarify what you are trying to do? You say you want "Total sales" but you say you don't want it to be cumulative??? I can't make heads or tails about what you want.

    • readyOH's avatar
      readyOH
      Frequent Visitor

      Sorry smoupre

      The criteria Month is a bad example. Let say : RevenueType  : Value : Product, services, others

      So I can have the total sales by RevenueType product, services, others for each month of the year.

      I want the sales for the value "products" and "services"

      If i create a mesure SalesExceptOthers : CALCULATE(SUM('Table1'[Sales]);FILTER(ALL('Table1'[RevenueType]);'Table1'[RevenueType]<>"others"))

       

      and then if i use this measure SalesExceptOthers in order to make a chart ( Y : SalesExceptOthers and X : month)

      I will have a cumulative value each month. So February = Sales of January + Sales of February. March = Sales of February

       

      What iwant is to have the total sales for each month, filter them with a criteria (for example RevenueType) without using the panel (see image above)

       

      • ALeef's avatar
        ALeef
        Resolver II

        Are you talking about using a slicer?  So you would have your fields you want to slice by ("products" and "Services" ), and then your chart/graph/whatever shows Sales by month?