Forum Discussion
sanc_152
3 years agoHelper I
Sequence Calculations
Hi All, Need one help Product Customer Week Date Flag 1 A 1 01-01-2023 Y 1 A 2 08-01-2023 Y 1 A 3 16-01-2023 Y 1 B 1 01-01-2023 Y 1 B 2 08-01-2023 Y ...
- 3 years ago
pls try again this
Ahmedx
3 years agoSuper User
pls try this
Flag Column =
VAR t1 = [Product]
VAR t2 = [Customer]
VAR t3 = [Week]
VAR _tbl = SELECTCOLUMNS(ADDCOLUMNS( GENERATESERIES(1,53), "Step", [Value]&","&[Value]+1 &","&[Value]+2),"Step",[Step])
VAR _Result = CONCATENATEX(FILTER(ALL('Table'),'Table'[Product]=t1&&'Table'[Customer]=t2),[Week],",")
RETURN
IF(MAXX(FILTER(_tbl, CONTAINSSTRING(_Result,[Step])),[Step]), "Y","No")- sanc_1523 years agoHelper I
Hi Ahmedx
Thanks for your hardwork and prompt reponse.
the Dax you have given to me it is only finding the patern whether it available or not .but my requirement is little differnt.in the screenshot above for product 1 there are 2 customers a,b respec. and we are sending the same product to 2 cutsomers (a,b)within the same time frame week1,2,3 and it ismore than 2 weeks .So I want to consider only those product and customer with ahving same time frame and assign a flag As Y
Hoppefully now it is clear .
Best Regards
san