Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the below exoression in bar chart and my dimension is year & Qtr.
I need to get the sum on Distinct Code.How can I do that ?
Sum(Aggr(sum(if([Type]='Direct Lease',SQF_Committed)) <=0,
sum(if([Type]='Direct Lease',SQF_Committed_Planned),
sum(if([Type]='Direct Lease',SQF_Committed))),CodeKey))
I tried the bwlow exoression,but it dosnt work.
Sum(Aggr(sum(if([Type]='Direct Lease',SQF_Committed)) <=0,
sum(if([Type]='Direct Lease',SQF_Committed_Planned),
sum(if([Type]='Direct Lease',SQF_Committed))),distinct CodeKey))
Thanks much.
Try this
=Sum({<[Type] = {'Direct Lease'}>}Aggr (Avg({<[Type] = {'Direct Lease'}>} SF), Code))
or
=Sum(Aggr (Avg({<[Type] = {'Direct Lease'}>} SF), Code))
Not sure what you trying to do, but are you missing an if statement?
Sum(Aggr(
If(Sum({<Type = {'Direct Lease'}>} SQF_Committed) <= 0,
Sum({<Type = {'Direct Lease'}>} SQF_Committed_Planned),
Sum({<Type = {'Direct Lease'}>} SQF_Committed))
, CodeKey))
or
Sum(Aggr(
If(Sum({<Type = {'Direct Lease'}>} SQF_Committed) <= 0,
Sum({<Type = {'Direct Lease'}>} SQF_Committed_Planned),
Sum({<Type = {'Direct Lease'}>} SQF_Committed))
, CodeKey, Year, Qtr))
Thank you Sunny.
Sum(Aggr(sum(if([Type]='Direct Lease',SQF_Committed)) <=0,
sum(if([Type]='Direct Lease',SQF_Committed_Planned),
sum(if([Type]='Direct Lease',SQF_Committed))),CodeKey))
This expression works fine but when I have same CodeKey twice its double counting the SQF.
I want to get the sum of SQF on distinct CodeKey.Can I do that ?
@sunnyt stalwar1
Would you be able to share a sample to show the issue?
Try this
=Sum({<[Type] = {'Direct Lease'}>}Aggr (Avg({<[Type] = {'Direct Lease'}>} SF), Code))
or
=Sum(Aggr (Avg({<[Type] = {'Direct Lease'}>} SF), Code))
Awesome.You are my saving grace
I believe so... have you tried it isn't working?