Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi team,
I am using the below expression in a line chart. I get the trend line if I select only one channel, however if i select multiple channels, the chart is simply blank. pl help me solve this.
if(Channel='AMS',Sum({$<Variables={"ams_direct_cost"}>}Values),
if(Channel='GCM',Sum({$<Variables={"gcm_direct_cost"}>}Values),
if(Channel='FB',Sum({$<Variables={"fb_direct_cost"}>}Values),
if(Channel='ISG',Sum({$<Variables={"isg_direct_cost"}>}Values)))))
regards, mahe
Create Text object and add below measure; Just for your reference and Understanding..
Concat(distinct Channel, ',')
It's giving Null for Multiple Channel selection because none of the IF condition is satisfied and there is no ELSE condition for last statement.
Tip: Avoid nested if; look into Pick & Match approach.
hi pradeep,
thanks for the prompt reply. Yes i usually try my expressions in the text object. I tried using Pick & Match . Ref below. I am not able to solve it yet. Can you pl help me fix this.
Pick(match('AMS','GCM','FB','ISG'),
Sum({$<Variables={"ams_direct_Impressions"}>}Values),
Sum({$<Variables={"gcm_direct_Impressions"}>}Values),
Sum({$<Variables={"fb_direct_Impressions"}>}Values),
Sum({$<Variables={"isg_direct_Impressions"}>}Values))
thanks, mahe
What is the definition for this? "Variables"
Hi Anil,
The variables are list of fields like ams, gcm, fb which is loaded as a crosstable.
Below is the load script. Is crosstable causing this issue.
Main:
CrossTable(Variables,Values,5)
LOAD
*
FROM [lib://Input File-MMM (code1_*******)]
(ooxml, embedded labels, table is [Input file]);
I can understand that you have field and in it there are variable. But, If you can share the definition of variables we can understand that. Are they filed names?