
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if condition with Aggregation Expression
Hi All..
I Want to create funnel chart ... so i have a Inline Table Say,
FunnelView:
Load * Inline
[
"KPI Funnel", FunnelViewDimOrder
"Spend", 1,
"Sessions", 2,
"Leads", 3,
];
And in funnel chart .. I have a Dimension [KPI Funnel]
And Expression :
if([KPI Funnel]='Leads', Count(distinct LeadID),
if([KPI Funnel]='Spend',Sum(Spends),if([KPI Funnel]='Sessions',Sum(Aggr(Visits,VisitFull)) )))...
Leads and Spend giving a Output but Session is Showing 0 ... for Session exp : Sum(Aggr(Visits,VisitFull)) is
Correct because i am getting a proper value without if condition in other chart .. i tried Writing like this as well
:Sum(if([KPI Funnel]='Sessions',(Aggr(Visits,VisitFull)))) ... its giving value but not correct value kindly help me for the same...


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>Sum(Aggr(Visits,VisitFull)) is Correct because i am getting a proper value without if condition in other chart
Your expression looks OK - Sum(If()) is not correct in this context.
What are the dimensions on the table where this expression works?
Why an Aggr()?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, I would load the dimension like this:
FunnelView:
Load Dual(Text, Order) as "KPI Funnel"
Inline
[
Text, Order
Spend, 1,
Sessions, 2,
Leads, 3,
];
And then used this rather than a nested if:
=Pick("KPI Funnel",
Sum(Spends),
Sum(Visits), // why do you nee an Aggr??
Count(distinct LeadID)
)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jonathan ,
I have a two table from where i am getting an value .. without Aggr i am not getting an proper value..
so i have to use the same.. cant we use aggr in if else...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Aggr expression gives correct output on all dimension say , Date Channel and rest

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi can anyone please update me on my query

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You can try this.
Sum(Aggr(Sum(Visits),VisitFull))
Regards,
Kaushik Solanki
