Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to create a calculated dimension for a chart using a concat function?
I tried 2 variants:
1st
='(' & Concat({<Quantity ={"=sum(Quantity)>0"}>}DISTINCT chr(34) & Brands & chr(34), '|') & ')'
2nd
=Concat({<Quantity ={"=sum(Quantity)>0"}>} DISTINCT Chr(39) & Brands & Chr(39),',')
None of them work.
see the file attached.
Thank you in advance,
Larisa
this??
Dimension: =If(Aggr(Sum(Quantity), Brands)> 0, Brands)
Expression: Sum(Budget)
Uncheck Suppress Zero-Values on Presentation
Check Suppress When Value Is Null
Attaching the qvw for reference.
HTH
Best,
Sunny
Hi Larisa,
Why don't use Aggr() instead ?
Like
Aggr(If(Sum(Quantity) > 0,Brands),Brands)
Regards,
Antonio
You need definitely an aggr to build a calculated dimension:
aggr(Concat({<Quantity ={"=sum(Quantity)>0"}>} DISTINCT Brands,','), Brand)
- Marcus
Hi,
I hope this can help you.
Best regards.
What exactly are you trying to do? You want to see a single bar for all the brands where quantity > 0? Is that your requirement?
Best,
Sunny
Hi Giuseppe,
Thank you,
But I can't understand why the condition 'sum(Quantity)>0' doesn't work for this dimension. I want to display only those brands in my dimension where the condition 'sum(Quantity)>0' = truth.
Brands 3,4, 7,8 should not be displayed then.
see the file attached.
Hi Larisa!
Try with this:
=if(Aggr(sum(Quantity),Brands)>0,Chr(39)&Brands&Chr(39) & ' ' & Aggr(if(sum(Quantity)>0,sum(Quantity),0),Brands),'')
this??
Dimension: =If(Aggr(Sum(Quantity), Brands)> 0, Brands)
Expression: Sum(Budget)
Uncheck Suppress Zero-Values on Presentation
Check Suppress When Value Is Null
Attaching the qvw for reference.
HTH
Best,
Sunny