Forum Discussion

HarrisC41's avatar
HarrisC41
New Member
3 years ago
Solved

FILTER Parameter in DAX

Hi I'm following an online coirse where the instructor made this DAX code and it worked fine for him, but I am getting no results. He was running an older version of PBI Desktop (June I think), this is my best guess as to why but could anyone with more knowledge give me a more specific reason. Thanks

 

  • HarrisC41 ,

    Try at Category level

     

    Sumx(filter(Values('Product Lookup'[Category]), [Avg Retail Price] > [Overall Retail Price]), [Total Orders])

    Or Product level

    Sumx('Product Lookup', if( [Avg Retail Price] > [Overall Retail Price], [Total Orders], blank()))

1 Reply

  • HarrisC41 ,

    Try at Category level

     

    Sumx(filter(Values('Product Lookup'[Category]), [Avg Retail Price] > [Overall Retail Price]), [Total Orders])

    Or Product level

    Sumx('Product Lookup', if( [Avg Retail Price] > [Overall Retail Price], [Total Orders], blank()))