Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Daryn
Creator
Creator

Issue with LOAD AS when using field as a Dimension in a chart and renaming.

Hi all,

Sorry subject title is a little sketchy, couldn't think of how to word it.

I have a standard SAP field 'MATKL' (material number.

I want to create a new dimension relating to what I will call a top level selection of its values.

The values I want to group all belong with either AL, EL or ST (followed by 3 digits).

I thought I could create three new fields as below (as well as still keeping the original field);

[MATKL] AS [ZKPI_PUR_RATIO.MATKL],
[MATKL] like 'AL*'AS [ZKPI_PUR_RATIO.MATERIAL_AL], 
[MATKL] like 'EL*'AS [ZKPI_PUR_RATIO.MATERIAL_EL], 
[MATKL] like 'ST*'AS [ZKPI_PUR_RATIO.MATERIAL_ST],

Fine, So I created a new master dimension as;

=[ZKPI_PUR_RATIO.MATERIAL_AL]&[ZKPI_PUR_RATIO.MATERIAL_EL]&[ZKPI_PUR_RATIO.MATERIAL_ST]

And dropped this into a pie chart as a dimension and he measure was a simple sum of value field.

However, the naming it then uses is something different and I am assuming the fourth slice is relating to others (although ticking or not ticking 'others' makes no difference to the chart).

Daryn_0-1657548887665.png

So I tried with just one of those new fields and no different.

Daryn_1-1657548986130.png

And again ticking or unticking 'Others' does not change anything on the chart..

What I really want in that first image is for the slices to show as 'AL' , 'EL'  and  'ST'

Thanks in advance for your help/guidance, as always it's appreciated.

Regards Daryn

 

 

Labels (1)
2 Solutions

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't think you want to create three new fields for this requirement. A more straightforward approach may be to just create a single field like:

Left([MATKL], 2) as Group

and then use Group as your dimension.  

If you only want to Group AL/SL/ST and exclude other MATKL values you could do:

If (WildMatch([MATKL],  'AL*', 'SL*', 'ST*'), Left([MATKL], 2) as Group

The non matches would have Null for group. Or you could assign an "Others" value 

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

MayilVahanan

HI

One more bracket need to include.. try like below

If (WildMatch([MATKL],  'AL*', 'SL*', 'ST*'), Left([MATKL], 2)) as Group

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't think you want to create three new fields for this requirement. A more straightforward approach may be to just create a single field like:

Left([MATKL], 2) as Group

and then use Group as your dimension.  

If you only want to Group AL/SL/ST and exclude other MATKL values you could do:

If (WildMatch([MATKL],  'AL*', 'SL*', 'ST*'), Left([MATKL], 2) as Group

The non matches would have Null for group. Or you could assign an "Others" value 

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

Daryn
Creator
Creator
Author

Hi Rob, 

Thank you very much for taking the time to look at my issue and assist.

What you have said makes sense, however it seems to have an issue with the 'as' at the end?

Daryn_0-1657611135221.png

 

Am I missing something (I will blame the heat if I am) 🙂  

Again, thank you, I appreciate everyone's time is valuable to them.

Regards Daryn

MayilVahanan

HI

One more bracket need to include.. try like below

If (WildMatch([MATKL],  'AL*', 'SL*', 'ST*'), Left([MATKL], 2)) as Group

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.