Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to run a chart with external data from xlsx. Everything is working since now ok, the data is loaded correctly. I want to show/hide an expression on the chart when it's value is greater ol smaller than defined. I.e if 2+2 >=4 it should show value of summary else should show 0.
I have inserted an is sstatement into expression definition field
if (2+2 >> 4,2+2,0)
but it always shows 2+2 value (4). I'm trying with cnstant values to better understand the if clause, but it doesn't make the difference.
The goal is to make if clause for expression fields (data series) of the chart if(expression1+expression2+expression3 >> 7000, 0, 2000+expression1+expression2+expression3)
How can this be completed?
Best regards
Marcin
Try using a single greater than sign: >
Hi Marcin,
Not sure if I got you right, but, did you try using Column() to refer to the different columns within the chart? For example, in a chart where Month is the dimension, and expressions are Sum(Sales) and Sum(Costs), Margin could be
Column(1) - Column(2)
Instead of writing
Sum(Sales) - Sum(Costs)
that will work as well, though.
Hope that helps.
Miguel
still no luck, I've tried the method with one < but doesn't seem to work. Below you will find code attached:
If(PLAYFIXED1+PLAYINTERN1+PLAYORANGE1+PLAYPLAY1+PLAYPLUS1+PLAYROAMING1+PLAYSMS1+PLAYSMS_INT1+[PLAYSSMS ROAMING [ilosc]]1]+PLAYTMOBILE1 < 7000,2000,PLAYFIXED1+PLAYINTERN1+PLAYORANGE1+PLAYPLAY1+PLAYPLUS1+PLAYROAMING1+PLAYSMS1+PLAYSMS_INT1+[PLAYSSMS ROAMING [ilosc]]1]+PLAYTMOBILE1-7000+5040)
I need sum of all columns to test if greater/less than 7000, and if less to put a fixed value, else put a calculated value.
BR
Marcin
What does this expression refer to:
[PLAYSSMS ROAMING [ilosc]]1]
this is reference to xls column name PLAYSSMS ROAMING ilosc 1
[PLAYSSMS ROAMING ilosc1]
doesn't work neither. I have build the sentence using function builder, not by my own.
Can you post a qvw?
Try:
If(PLAYFIXED1+PLAYINTERN1+PLAYORANGE1+PLAYPLAY1+PLAYPLUS1+PLAYROAMING1+PLAYSMS1+PLAYSMS_INT1+[PLAYSSMS
ROAMING ilosc1]+PLAYTMOBILE1 < 7000,‘2000’,((PLAYFIXED1+PLAYINTERN1+PLAYORANGE1+PLAYPLAY1+PLAYPLUS1+PLAYROAMING1+PLAYSMS1+PLAYSMS_INT1+[PLAYSSMS
ROAMING ilosc 1]+PLAYTMOBILE1)-7000)+5040)