Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have an issue with "filtering" my market dimension with trim.
This is the current code that works, it is an expression in a table:
sum(if(ANNO_TBL=Anno_Exp and DATA<=Mese_Pari_Data AND TRIM(MARKET_2)='660' ,$(vQtFatturato)))
My market dimension has all the markets that my company sells to. Let's say that i need to see just 2 or 3 markets, not 1 or all of them, but every time I try adding another market, it doesn't work. What is the correct way to write this? I am not familiar with this and so far I have only worked with code written by other people.
I've tried:
A. sum(if(ANNO_TBL=Anno_Exp and DATA<=Mese_Pari_Data AND TRIM(MARKET_2)='660' AND TRIM(MARKET_2)='36' ,$(vQtFatturato)))
B. sum(if(ANNO_TBL=Anno_Exp and DATA<=Mese_Pari_Data AND TRIM(MARKET_2)='660' OR TRIM(MARKET_2)='36' ,$(vQtFatturato)))
Basically I need to show to every seller, only their markets ex. Bob sells to the UK, Brazil and Norway, so he sees a table of only his markets.
Thanks is advance.
try:
sum(if(ANNO_TBL=Anno_Exp and DATA<=Mese_Pari_Data AND Match(TRIM(MARKET_2)='660' ,'36') ,$(vQtFatturato)))