Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
taha_mansoor
Creator
Creator

How to make the Dimension Subset out of the Dimension Table in Load Script

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​

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Date(Floor(YourTimeStampField)) as YourDateField

Time(Frac(YourTimeStampField)) as YourTimeField

View solution in original post

4 Replies
MK_QSL
MVP
MVP

Date(Floor(YourTimeStampField)) as YourDateField

Time(Frac(YourTimeStampField)) as YourTimeField

jonathandienst
Partner - Champion III
Partner - Champion III

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,

  ...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

t4.png

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
taha_mansoor
Creator
Creator
Author

Thank you Manish. It worked.