Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have created two varibale vDate1,vDate2
vDate1=min(IntimationDate)
vDate2=max(Date)
I need to Find Monthdifference Between vDate1 to vDate2 and need to create bucketing like
Count(ContractNumber) where MonthDifference<4Months
Count(ContractNumber) where MonthDifference>5Months
Count(ContractNumber) where MonthDifference=4-5Months
and use that in set analysis.??
like (Count({$<"Monthdifference>4">}ContractNumber))
Kindly help Also tell how to write it in Set analysis??
LOAD Month(Date2)-Month(Date1)+(Year(Date2)-Year(Date1))*12 as Monthdifference
FROM YourSource;
To calculate month difference:
Monthdifference = (((year(vDate2)*12)+month(vDate2)) - (((year(vDate1)*12)+month(vDate1))))
If you calculate that in LOAD script you can use it in Set Analysis afterwards the way you describe
LOAD Month(Date2)-Month(Date1)+(Year(Date2)-Year(Date1))*12 as Monthdifference
FROM YourSource;
Hi,
Can you help me regarding how to use vMonthdifference Varible in set analysis,like
Count({$<'$(vMonthDifference)'<4>}ContractNumber) is this right??
I don't think you should use a variable for your Monthdifference field, to compare against a fixed value (ie 4) try like:
Count( {<Monthdifference={"<4"}> } ContractNumber)
If you want the users to be able to change the value to compare with you can have a variable (ie vMonthDiff) and use it like:
Count( {<Monthdifference={"<$(vMonthDiff)"}> } ContractNumber)
/gg