Forum Discussion
Exclude items from TOPN
Hi Oros
try it
ITEM RANKING = RANKX(FILTER(ALL(Product_Table[Item]),Product_Table[Item])<>"yourItem1"&&Product_Table[Item])<>"yourItem2"),Product_Table[Sales],, DESC)Hi Anonymous ,
It does not look like it's working. Maybe it's just missing some characters?
Attached is the screenshot directly from Power Bi. Just for the purpose of this example, I replaced the original table name to 'Product_Table'. Please ignore the spaces atthe beginning and end of 'Product_Table'. But how it looks in Power Bi with the original table name is the same.
Thanks.
- Anonymous5 years agoNot applicable
Hi Oros
Yes, && is missing between the two items, highlighted here
ITEM RANKING = RANKX(FILTER(ALL(Product_Table[Item]),Product_Table[Item])<>"yourItem1" && Product_Table[Item])<>"yourItem2"),Product_Table[Sales],, DESC)- Oros5 years agoPost Prodigy
Hello Anonymous ,
Thank you for your reply.
I tried it and still did not work. The second item to exempt is greyed out.
Please see attached.
Thanks again.
- Anonymous5 years agoNot applicable
Hi Oros
There is a hint, the syntax "," is not correct. You may to go to format your DAX code and try to find out your problem. Or I will pm you my email, you can send me your DAX measure or sample file if you want.