Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create 3 values from one date field variable

Hi All ,

Would it be possible to create 3 values from one date filed.what I am expecting here

If date field is null show as Pend , if date field is not null show as complete and want to show if date field is total as Recieved

This is expecting

if(isnull(date ),'Pend',if(not Is null(date),'complete ',if(isnull(date)and if (is not null(date),'received') as newfield

I am able to getting two values that Pend ,complete

How to get two values total as received

Please guide me how to do it

31 Replies
Not applicable
Author

the third condition is here  I am expecting both total count like : pend--Null,complet---not null and received ----both count(pend & complete)

Not applicable
Author

I know how to get two values total as received using  in a another condition, but  my requirement is, in a  same condition I want see pend(null), complete(not null) and received(both count), assume I want to  see three values as a dimension. I am not sure is that possible or not  

sunny_talwar

May be create a link table using your existing table:

LINKTABLE:

LOAD 'Pending' as Flag,

          UniqueIdentifierFieldHere

From YourFactTable

Where Len(Trim(date)) = 0;

Concatenate(LINKTABLE)

LOAD 'Complete' as Flag,

          UniqueIdentifierFieldHere

From YourFactTable

Where Len(Trim(date)) > 0;

Concatenate(LINKTABLE)

LOAD 'Received' as Flag,

          UniqueIdentifierFieldHere

From YourFactTable;

syukyo_zhu
Creator III
Creator III

Yes you can do it

count({<newfield={'received*'}  >}mesure) for both

count({<newfield={'received-Pend'}  >}mesure) for one

count({<newfield={'received-complete'}  >}mesure) for one

Not applicable
Author

Pending missing for your logic (above chart)

Expecting Chart below ,this chart don't have dimension, three individual expressions ,requirement is need to show as dimension

Not applicable
Author

I need to show as a  dimension, I already applied three individual expression ,look at the below one. let me tell you my req  user want to select bar individually but he wont able to select because of there is no any dimension ,now if I want to create dimension user able to select it isn't it   

sunny_talwar

Can you share the script you used?

syukyo_zhu
Creator III
Creator III

OK i  got it.

So i think your should do it on your script.

load *,

if(isnull(date ),'Pend',if(not Is null(date),'complete ') as newfield

from your table;

concatenate

load *,

'received' as newfield

from your table;

And then you can use newfield as dimension in your chart.

hope helpful

Kushal_Chawda

First create the Flag in scrip

LOAD *,

if(len(trim(Date))=0 or isnull(Date),'Pending',

if(len(trim(Date))>0 or not isnull(Date),'Completed')) as Flag

Create Bar chart

Dimension:

Valuelist('Received','Completed','Pending')

Expression:

=pick(match(Valuelist('Received','Completed','Pending'),'Received','Completed','Pending'),

Sum({<Flag={'Pending','Completed'}>} Amount),

Sum({<Flag={'Completed'}>} Amount),

Sum({<Flag={'Pending'}>} Amount) )

Not applicable
Author

I am able to get three values on bars but I want to select each bar that is my requirement.this logic wont work out isn't it I mean as per selesctions