Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Qlik Sense.
When I am using below calculation in table to show data, its working fine.
if(status='Submitting' OR status= 'Composing' OR status= 'Submitted' , OrderNumer)
Above calculation gives me list of Order numbers. The result is correct here. Number of records are 33.
But same calculation when I am using in KPI to show that count, I am not getting expected result.
Below is calculation I am using for KPI. (Even without DISTINCT)
COUNT( DISTINCT if(status='Submitting' OR status= 'Composing' OR status= 'Submitted' , OrderNumer))
This gives me more count in some cases. like 80 or 82 which is wrong (with or without DISTINCT).
Is it due to any null value or something.
Please Help to handle this.
Maybe try Set Analysis.
Below typed freehand, so may have typo's :
Count ( { < [status] = { 'Submitting' , 'Composing' , 'Submitted' } > } distinct [OrderNumber] )
Maybe try Set Analysis.
Below typed freehand, so may have typo's :
Count ( { < [status] = { 'Submitting' , 'Composing' , 'Submitted' } > } distinct [OrderNumber] )
Thanks a lot Bill..
Sorry for late reply.
working fine now with this set analysis.
but still thinking what is the difference,
In other KPI for same case, my previous calculation is giving exact result.
Anyways ... Thanks once again.
appreciate your quick response.
Hard to say without full visibility of your data and qvf.
But in general it is always better to use Set Analysis as it is a lot more efficient than If's, hence also best practice.
Glad you are on the road and it is working now.
Is status and OrderNumber coming from different tables in your back end data model? I have seen unexpected numbers when above is the case
Its actually a two different tables from DB side but we have created View on top of it to use processed data in Qlik.