Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jogou19
Contributor
Contributor

Calculated Dimension Ignore Null Values

Hi

I have a straight table that has 2 dimensions and one measure. 

Dim1: Customer

Dim2: Job # 

Measure: Income for last 12 months based on each customer. 

I am trying to exclude null values in the set expression of my Job# field. Only those jobs related for a particular period that the user has selected should show. Currently I am using the set expression in the Job# field as: =Aggr(Maxstring({<$[uShip Code]-={'' }>}[uShip Code]),[uShip Code]) but this is not working. 

When I tried to uncheck the 'Include null values' box in the job# field, the null values are excluded BUT my measure values become incorrect. 

Currently my measure reads as:

Sum({$<[GMVessFactType]={'Actual'}, Sort.Year=, Month, [YearMonth]={">=$(=([YearMonth])-100)<$(=([YearMonth]))"}>}Total<[uSheet1-3.Principal Name]>[Actual Income])

Could I please get some help in how i can exclude the null values in the job# field. 

Thanks

Jo

 

Labels (3)
1 Reply
Anil_Babu_Samineni

Perhaps this, There are many ways we can achieve this but 2 of them

Sum({$<job#={"=Len(job#)>0"}, [GMVessFactType]={'Actual'}, Sort.Year=, Month, [YearMonth]={">=$(=([YearMonth])-100)<$(=([YearMonth]))"}>}Total<[uSheet1-3.Principal Name]>[Actual Income])

Or

Sum({$<[GMVessFactType]={'Actual'}, Sort.Year=, Month, [YearMonth]={">=$(=([YearMonth])-100)<$(=([YearMonth]))"}>}Total<[uSheet1-3.Principal Name]> If(Not IsNull(job#), [Actual Income]))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful