Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Mothapoe
Contributor II
Contributor II

Removing Blank Date values from Chart View

Good Day, Can you please assist in resolving current issue I am having regarding Blank Date fields. I have attached below document describing the problem. Your assistance will be gladly appreciated.

Labels (1)
2 Solutions

Accepted Solutions
Mothapoe
Contributor II
Contributor II
Author

@vchuprina - functionality is already activated but null values are still being displayed. See attached

View solution in original post

vchuprina
Specialist
Specialist

Hi,

I've read your post again and understood why you have the issue.

Date(max(DATA_VAL) -1,'YYYYMMDD') always returns the previous date, for this reason, you have 20220327.

You should create DateIndex field in the script based on DATA_VAL field, you can do this with autonumber function, for instance

AutoNumber(DATE_VAL, 'DATE') as DataIndex

Please remember that you should order data in your table in the correct way

After this you will have the following: 

DATE_VAL DAY_NO DateIndex
3/19/2022 19 1
3/22/2022 22 2
3/24/2022 24 3
3/25/2022 25 4
3/26/2022 26 5
3/28/2022 28 6

 

max(DATEINDEX) -1 will return data for DATEINDEX 5 - 3/26/2022

max(DATEINDEX) - 4 will return data for DATEINDEX 2 - 3/22/2022

Your expression should be like this:

count({<DataIndex= {"$(=max(DataIndex)-1)"},DAY_NO=>}[Account Number])

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").

View solution in original post

4 Replies
vchuprina
Specialist
Specialist

Hi,

Open the presentation tab of your table and select the necessary dimension/expression and select suppress zero-values

vchuprina_0-1652442480400.png

Regarsds,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
Mothapoe
Contributor II
Contributor II
Author

@vchuprina - functionality is already activated but null values are still being displayed. See attached

vchuprina
Specialist
Specialist

Hi,

I've read your post again and understood why you have the issue.

Date(max(DATA_VAL) -1,'YYYYMMDD') always returns the previous date, for this reason, you have 20220327.

You should create DateIndex field in the script based on DATA_VAL field, you can do this with autonumber function, for instance

AutoNumber(DATE_VAL, 'DATE') as DataIndex

Please remember that you should order data in your table in the correct way

After this you will have the following: 

DATE_VAL DAY_NO DateIndex
3/19/2022 19 1
3/22/2022 22 2
3/24/2022 24 3
3/25/2022 25 4
3/26/2022 26 5
3/28/2022 28 6

 

max(DATEINDEX) -1 will return data for DATEINDEX 5 - 3/26/2022

max(DATEINDEX) - 4 will return data for DATEINDEX 2 - 3/22/2022

Your expression should be like this:

count({<DataIndex= {"$(=max(DataIndex)-1)"},DAY_NO=>}[Account Number])

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
vinieme12
Champion III
Champion III

Just change vPrevDate to below, to load second latest date

=Date(max(DATE_VAL,2) ,'YYYYMMDD')

 

 

Also, if the weekend and holiday dates are still appearing in your charts that means they exist in your dataset

"created a Date script that excludes dayswhere it is Sunday and Public Holiday. Joined the date QVD to base Dataset and now"

I would suggest you do an inner keep or inner join to completely remove weekend/holiday dates from the dataset if you don't need them at all

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.