Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am currently trying to capture the averages where the completed date is Null. When I use a set analysis for the measures in a bar chart, I get zero values for everything.
Currently I have tried two different methods. Both show null values on chart unless I eliminate Completed Date
avg(if([Completed Date]='-' and [Location]='Mechanic' and [Latest_Record]='Yes' ,[Current Work Days]))
avg({<[Latest_Recod={'Yes'}, [Location]={'Mechanic'}, [Completed Date]={'-'} >} [Current Work Days])
Car Vin Number | Current Work Days | Completed Date | Expected Completion | Car Model | Latest_Record | Location | Location |
8200000247 | 406 | - | 8/8/2022 | 7 Series | Yes | Mechanic | CA |
8200000247 | 4501 | - | 1/14/2011 | 7 Series | - | Mechanic | VA |
8200000247 | 3181 | 5/20/2014 | 5/20/2014 | 7 Series | - | Mechanic | CA |
8200000247 | 2547 | 1/29/2016 | - | 7 Series | - | Mechanic | CA |
8200000247 | 2197 | 1/5/2017 | - | 7 Series | - | Mechanic | CA |
8200000247 | 2048 | 9/27/2017 | 11/2/2017 | 7 Series | - | Mechanic | CA |
8200000247 | 1637 | 8/22/2018 | - | 7 Series | - | Mechanic | CA |
You cannot select NULL or test for NULL using an equals sign. See https://community.qlik.com/t5/Design/Finding-NULL/ba-p/1474279.
The work-around is to make the selection in another field, usually in the primary key. If you have a field "TransactionID", you could use the following set analysis:
{<TransactionID=E({<[Completed Date]={"*"}>} TransactionID)>}
The E() function returns all TransactionIDs that are excluded when you select all dates. I.e. the ones where the date is NULL.
Tried to use your syntax and also tried adjusting the parentheses but didn't seem to budge