Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a following sample data(given below) in which I have to implement a logic.
I want where cause damage tag=1 and also want to pick only one column (among material,outside labour,outside material and labour operation) where three values are # and under one column there is some value then that column needs to be picked in pivot table
like marked in red colour in below table. so how to write a calculated dimension
for eg:-
|
|
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||
6R0937087ADZ0R | CONTR.UNIT | # | 1500000 | # | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
6R0937087ADZ0R | CONTR.UNIT | # | # | # | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
# | Not assigned | # | 13621999 | # | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
6R0959802EFZ05 | WIND.MOT. | # | 70591900 | # | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
6R0959802EFZ05 | WIND.MOT. | # | # | # | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
6R0959801EDZ05 | WIND.MOT. | # | 70591900 | # | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
6R0959801EDZ05 | WIND.MOT. | # | # | # | 1 |
I would venture it is going to be difficult for anyone to help you unless you attach a sample app with some data and your data model etc.
The only other thing I can offer is the following:
https://community.qlik.com/t5/Qlik-Design-Blog/Calculated-Dimensions/ba-p/1472813
That may help you decide if calculated dimension is really what you want to do or if it would be better to use Set Analysis instead.
https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344
If you wish to search the Design Blog area further on your own, use the following URL for that:
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
There are hundreds of mostly how-to posts in that area from our experts, so would think you should be able to find some things to help you with this one if I have not hit on the right ones.
Regards,
Brett
Hi,
Data model contains a single fact table and final UI Application and raw sample data is also attached is as follows(screenshot attached):-
Here I want to apply a logic that when (refer raw data) cause damage type=1 and among material,outside material,labour operation and outside labour only one value will be considered and displayed under the marked column (marked in black color)
The value which needs to be considered depends upon the following for eg if cause of damage type=1 and under material value is 123456 , outside material #, labour operation is # and outside labour is # then in this case material will be picked and will be shown under column (circled in UI application (refer picture below)
simillarly eg-2 if cause of damage type=1 and under material value is # , outside material 12345, labour operation is # and outside labour is # then outside material column will be picked and value under outside material displayed in pivot chart (as shown below)
final UI application
Hi,
I have created following expression.
=if([Cause of Damage Tag]=1, if([Outside Labour]='#',if([Outside Material]='#',if([Labour Operation]='#',Material),
if([Outside Material]='#',if([Labour Operation]='#',if(Material='#',[Outside Labour]),
if([Outside Material]='#',if([Labour Operation]='#',if([Outside Labour]='#',[Labour Operation]),
if([Outside Labour]='#',if([Labour Operation]='#',if(Material='#',[Outside Material]))))))))))
Is it correct?