Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Coalesce() is available in Qlik, as are if() and isnull(). For explicit conversion to numbers, num#() is available.
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