Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have Materials Table having codes like 001, 002, 003 ........100. I need to make the small sets of material codes as sub dimensions like 001, 002 and 003 as sub-dim1 , 004, 005 and 006 as sub-dim2 and so on. In SQL we use 'Between' function to specify the range of values in query but its not working in Qlikview script when doing conditional Load.
One more query, there is time stamp showing up with date data in date column. How to remove it ?. I just want to show the date in my table and not the time stamp with it.
Thanks,
Taha
Date(Floor(YourTimeStampField)) as YourDateField
Time(Frac(YourTimeStampField)) as YourTimeField
Date(Floor(YourTimeStampField)) as YourDateField
Time(Frac(YourTimeStampField)) as YourTimeField
You might need to make sure that the material code loads as text, and then you can use a nested if, a pick match, or a mapping table to apply the group codes. With a nested if:
LOAD ...
text(MaterialCode) As MaterialCode,
If(MaterialCode < '003', 'SubDim1',
If(MaterialCode < '006', 'SubDim2',
If(MaterialCode < '010', 'SubDim3'
...
)
)
) As SubDim,
...
Thank you Manish. It worked.