Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
prashantsanchet
Creator
Creator

Sales for null Customer based on following condition

Hi Team,

I am having following condition

  • One Business Date which is always selected:
  • For that Business date, we are adding

     ITDTotal Sales =  Last Year Last date ITDSales value + YTDSales value for Current Business date 

  • Customer as Dimension
  • measure  as following

num(Sum({$<BusinessDate={'$(=date(yearend([BusinessDate],-1), 'MM/DD/YYYY'))'}>}[ITDSales] +

    

sum([YTDSales),'#,##0')


  • Enable the null values for Bar Chart

I want to show the

  • Total ITDSales in KPI (Including null)
  • How we can calculate TotalITDSales for null  Customer for above measure





4 Replies
OmarBenSalem

In ur script:

SET NullValue=”N/A”;

NullAsValue Customer ;

That way, the null customers will be interpreted in the calculations

Pleasee refer to :

http://www.johndaniel.com/index.php/when-values-arent-values-null-handling-in-qlik/

prashantsanchet
Creator
Creator
Author

Hi ,

Thanks for your reply . But still i need to get this.

  • I am using this expression in  bar chart and i am exporting the data in excel.
  • i want to show the null value in chart but i cant make changes in load script
  • Total ITDSales in KPI (Including null) should be equal to exported total
  • How we can calculate TotalITDSales for null  Customer for below measure

num(Sum({$<BusinessDate={'$(=date(yearend([BusinessDate],-1), 'MM/DD/YYYY'))'}>}[ITDSales] +

   

sum([YTDSales),'#,##0')

OmarBenSalem

can u try :

sum({<Customer ={"=isnull(Customer )"}>}Value)

?

prashantsanchet
Creator
Creator
Author

This is not working