Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
neerajthakur
Creator III
Creator III

How to implement nullif along with cast and coalesce in QlikSense

SQL Query

(select count(distinct(tp.trainerid)) from ptrainer tp inner join calendar tc on CAST(coalesce(NULLIF(tc.trainername, ''), '0') AS integer) = tp.trainerid where tc.calendarid IN (select csu.calendarid from enrolleduser eu group by csu.calendarid)) as performing

 

 

Thanks & Regards,
Please Accepts as Solution if it solves your query.
Labels (4)
2 Replies
Or
MVP
MVP

Coalesce() is available in Qlik, as are if() and isnull(). For explicit conversion to numbers, num#() is available.

marcus_sommer

The sql isn't executed from Qlik else just transferred to the database and Qlik received only the result of the query. If the query didn't return your expected results you need to adjust the sql or you may consider just to pull the data-tables from the data-base to Qlik and making the needed transformation there. It depends on the size of the data-set, the network performance and your know how level of Qlik vs SQL which way be more suitable for you.

- Marcus