Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
In Qliksense
Aggregrate Function with DrillDown group Getting Error
Dim (Drilldown group) --> Quarter,Month,Date Created
Created 1 Variable -->
vDim = IF(GETSELECTEDCOUNT([Quarter])=1 AND GETSELECTEDCOUNT([Month])=1,'[Date]',
IF(GETSELECTEDCOUNT([Quarter])=1,'[Month]','[Quarter]'))
Until This Works Fine.
When i use Aggr Function Looks Like
Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]),Quarter),'$#,##0')
Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]),Month),'$#,##0')
Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]),Date),'$#,##0') --> All these 3 Expression Works fine
When i use Variable instead of Field it Getting ' - ' (error)
Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]),$(vDim)),'$#,##0') --> Getting Error.
I tested the Variable by using Textobject with Expresion as $(vDim) its Working Fine, Reflecting the Same Filed Names.
Please Suggest any Solution ASAP
Try as variable (without equal-sign at the beginning) and without single-quotes around the fieldnames):
vDim:
IF(GETSELECTEDCOUNT([Quarter])=1 AND GETSELECTEDCOUNT([Month])=1,[Date],
IF(GETSELECTEDCOUNT([Quarter])=1,[Month],[Quarter]))
and as expression:
Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]),$(=vDim)),'$#,##0')
- Marcus
Not sure why you even need a Aggr() here? Why not just this
Num(Sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]), '$#,##0')
But in case it is needed and I am missing something, try this:
Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]), $(=GetCurrentField([Dim])),'$#,##0')
Hi Sunny,
Am talking About Qliksense, am remembering to you that in Qliksense there is no GetcurrentField() function available.
if i use Num(Sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]), '$#,##0')
in Pivot getting invalid Dimension
so am using in that way.
Sure, GetCurrentField isn't available. Thanks for reminding that
Once again what is the issue when you don't use Aggr? Invalid dimension? This is used a dimension or expression?
Hi Suresh,
I believe you need to evaluate the variable.
Try this
vDim = $(IF(GETSELECTEDCOUNT([Quarter])=1 AND GETSELECTEDCOUNT([Month])=1,'[Date]',
IF(GETSELECTEDCOUNT([Quarter])=1,'[Month]','[Quarter]')))
Try as variable (without equal-sign at the beginning) and without single-quotes around the fieldnames):
vDim:
IF(GETSELECTEDCOUNT([Quarter])=1 AND GETSELECTEDCOUNT([Month])=1,[Date],
IF(GETSELECTEDCOUNT([Quarter])=1,[Month],[Quarter]))
and as expression:
Num(Aggr(sum({<[PL.paidindays] = {'-14'}>}[PL.DueAmt]),$(=vDim)),'$#,##0')
- Marcus