Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rdsuperlike
Creator
Creator

Autonumberhash

Wats wrong with the below syntax, I want to use If and  Name l beginning from A90 or D90 or P90. But below script doesnt work.

AutoNumberHash128(IF([Name] like 'A90*', IF([Name] like 'P90*',If([Name] like 'D90*',([Part] &'-' & FLOOR(Date([Schedule ]))))))) AS DT_KEY

Any inputs?

1 Solution

Accepted Solutions
MarcoWedel

If(Wildmatch(Name, 'A90*','P90*','D90*'),AutonumberHash128(Part, Floor([Schedule ]))

could work, if you only want to generate key values for distinct combinations of Part and Schedule days if Name starts with A90, D90 or P90.

hope this helps

regards

Marco

View solution in original post

2 Replies
swuehl
MVP
MVP

I think this will like ... beginning from A90 AND D90 AND P90 which obviously doesn't work.

Try Wildmatch() instead:

AutonumberHash128( If( Wildmatch([Name],'P90*','D90*','A90*'), [Part] &'-' & FLOOR(Date([Schedule ])) ) AS ...

MarcoWedel

If(Wildmatch(Name, 'A90*','P90*','D90*'),AutonumberHash128(Part, Floor([Schedule ]))

could work, if you only want to generate key values for distinct combinations of Part and Schedule days if Name starts with A90, D90 or P90.

hope this helps

regards

Marco