Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am writing the below syntax to get total sum but not getting proper result.
Please advise what wrong i am doing here.
sum({<fMonthCD={$(=max(fMonthCD)-1),$(fReportMetricKeyId)={1}}>}fCallAnsweredBeforeThreshold)
fmonthCD is in format like "201507", "201508"... so on and under column i have values like 1, 2, 3.....
i want to get the sum for max of (fmonthCD).
Regards,
Prasanta
Hi,
what is in field fReportMetricKeyId it seems 1,2,3 and confirm it is field not variable then try like
=sum({< fMonthCD = {$(=max(fMonthCD)-1)}, fReportMetricKeyId = {'1'} >} fCallAnsweredBeforeThreshold)
Regards
Anand
You cannot have a variable or a function on the left hand side of your set analysis modifier
sum({<fMonthCD={$(=max(fMonthCD)-1),$(fReportMetricKeyId)={1}}>}fCallAnsweredBeforeThreshold)
May be you can try with an If here:
Sum({<fMonthCD={$(=max(fMonthCD)-1)>} If($(fReportMetricKeyId) = 1, fCallAnsweredBeforeThreshold))
Hi,
Thanks for your reply,
Please check the screen shot, as i am not sure why the max function is not working here.
What do you see when you add Max(fMonthCD) in a text box object or KPI object?
as in the aove screen shot, i m only getting zero.
Is there a chance the fMonthCD is a text field? and its Max cannot be calculated?
Can you test this: Sum({<fMonthCD={$(=MaxString(fMonthCD)}>} fCallAnsweredBeforeThreshold)
if fmonthCD have values like 1, 2, 3 you can use Max function
sum({<fMonthCD={"$(=max(fMonthCD)-1)"},fReportMetricKeyId={1}}>}fCallAnsweredBeforeThreshold)
If you fmonthCD have 201507, 201508 like that you need modify your expression:
sum({<fMonthCD={"$(=Date(AddMonths(Date(max(fMonthCD),'YYYYMM'),-1),'YYYYMM'))"},fReportMetricKeyId={1}}>}fCallAnsweredBeforeThreshold)
Try like below:
sum({<fMonthCD={"$(=max(fMonthCD)-1)"}>}fCallAnsweredBeforeThreshold)
i can calculate max(fmonthCD). see the screen shot.
but dont know why its not returning a result while using max inside my set analysis