Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Team,
I Stuck a requirement.i want to check vendor code exists in continues three months.
Requirement is what
If my vendor code come in continues three month then it show consistent otherwise inconsistent.
Means vendor code 101 if come in apr, may, jun then consistent if this code miss any one month like may then it non consistent
Hi Gaurav,
Do the following:
Use the expression: if(count({<Year_Month,Date_Num={">=$(=Num(AddMonths(Max(Date_Num),-2)))<=$(=Max(Date_Num))"}>}Vendor)=3,'Consistent','Inconsistent')
in a chart, using only the vendor code as dimension.
This will count when the code is used in the last three months and if it's equal to 3, its consistent, since it counts the vendor code for the past last three months.
If not, it excludes the vendor.
As example, it gives the following for the bellow load script:
Load script is as follows:
dummy:
Load
*,
Num(Year_Month) as Date_Num;
Load
Vendor,
Date#(Month,'YYYY-MM') as Year_Month;
Load * Inline
[
Vendor,Month
A,2018-10
A,2018-11
A,2018-12
A,2019-01
B,2018-10
B,2019-01
];
And attached the app i used.