Forum Discussion

jacschZA's avatar
jacschZA
Advocate I
4 years ago
Solved

DAX remove filter but keeps the same filter..

Hi DAX community!   Hope someone can assist me with this one. No doubt it is possible, just been racking my brain and not winning.   So I have a classic inventory dataset. Excpet with sizes relat...
  • MFelix's avatar
    4 years ago

    Hi jacschZA ,

     

    Create new table with only the Item codes:

     

    Now add the following measure to your model:

    Size Total = 
    VAR sizeTable =
        FILTER (
            ALL ( DimProduct ),
            DimProduct[ItemCode] IN VALUES ( Products[ItemCode] )
        )
    VAR Sizeselction =
        SELECTCOLUMNS ( sizeTable, "Size", DimProduct[Size] )
    RETURN
        CALCULATE (
            SUM ( 'Fact'[Qty] ),
            FILTER ( ALL ( DimProduct ), DimProduct[Size] IN Sizeselction )
        )

     

    Has you can see below when you select BBBB the result is only 53: