Forum Discussion

mukhan169's avatar
mukhan169
Icon for Helper III rankHelper III
7 years ago

Dax Adding filter to the measure

Good morning experts,

I have a table with field MISGroup that contains 0,3,12 or 24 in it.

For the following measure, how do I just add "where MISGroup=3" 

 

IPTV =
IF(ISBLANK([Total By MIS]) && [Sum of Sales]>0 && table[MISGroup]=3 |
0
|Divide([Running Total By MIS]|[Sum of Sales]|0)*1000
)

 

9 Replies

  • mukhan169 something like this

     

    Sum Sales = CALCULATE( SUM(Table[Sales]), Table[MISGroup]=3)
    • mukhan169's avatar
      mukhan169
      Icon for Helper III rankHelper III

      parry2k Thank you but

      Only add 0 for MISGroup =3. Otherwise dont. So this one wont work.

      Thanks for your reply

      • parry2k's avatar
        parry2k
        Icon for Super User rankSuper User

        mukhan169 try this

         

        Sum Sales = 
        VAR s = CALCULATE( SUM(Table[Sales]), Table[MISGroup]<>3)
        RETURN
        IF( ISBLANK(s), 0, s )