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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
maternmi
Creator II
Creator II

If statement


Dear all,

we have orders which are invoiced and which are not invoiced yet. I would like to show within a diagramm at the invoice date field the invoice date, if there is one. If there is no one I want to display a text (no invoice yet) instead of "-".

how can I do it within a diagramm.

I've tried

=if([invoice date] = 0 ,'no invoice yet', [Fakturadatum])

but I dosen't works. Does somebody knows the solution?

Thanks for helping!

Best regards,

Michael

1 Solution

Accepted Solutions
Not applicable

Hi,

You need to use either the isnull() function or the alt() one.

If(isnull([invoice date]) ,'no invoice yet', [Fakturadatum])

the alt() function gives you the second result if the first one is empty;

Alt([Fakturadatum]), ‘no invoice’)

Fabrice

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

     Load Invoice_Id,

             Invoice_Date,

             If(isnull(Invoice_Date),'No Invoice Yet','Invoice Generated') as Invoice_Flag

     From xyz.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

Hi,

You need to use either the isnull() function or the alt() one.

If(isnull([invoice date]) ,'no invoice yet', [Fakturadatum])

the alt() function gives you the second result if the first one is empty;

Alt([Fakturadatum]), ‘no invoice’)

Fabrice

jagan
Partner - Champion III
Partner - Champion III

Hi,

You can also do the same by using Len() like this

if(Len([invoice date]) = 0 ,'no invoice yet', [Fakturadatum])

Regards,

Jagan.