Forum Discussion

NDRS's avatar
NDRS
Frequent Visitor
2 years ago
Solved

Filter Measure (From Quick Measure)

Hi,

 

I've done some quick measures to filter values, but when I check the Measure against the filter it only return the total sum, not per filter or what to say. Is it possible to fix this?

 

This is the DAX: 

Kost.belopp (aktuellt) for 18, 6, or 1 =
CALCULATE(
    SUM('Artikeltransaktion (2)'[Kost.belopp (aktuellt)]),
    'Artikeltransaktion (2)'[Lagerställekod] IN { "18", "6", "1" }
)
 
So in this case I want to see the value per [Lagerställekod] 1, 6 and 18.

 

I want it to return the value like this (But without 85XX):

 

Have a nice friday all!

 

  • Hi,

    Please try something like below if it suits your requirement.

     

    Kost.belopp (aktuellt) for 18, 6, or 1 =
    CALCULATE (
        SUM ( 'Artikeltransaktion (2)'[Kost.belopp (aktuellt)] ),
        FILTER (
            'Artikeltransaktion (2)',
            'Artikeltransaktion (2)'[Lagerställekod] IN { "18", "6", "1" }
        )
    )
    

2 Replies

  • Hi,

    Please try something like below if it suits your requirement.

     

    Kost.belopp (aktuellt) for 18, 6, or 1 =
    CALCULATE (
        SUM ( 'Artikeltransaktion (2)'[Kost.belopp (aktuellt)] ),
        FILTER (
            'Artikeltransaktion (2)',
            'Artikeltransaktion (2)'[Lagerställekod] IN { "18", "6", "1" }
        )
    )