Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to restric dates when total experssion value is zero

Hi team,

i am facing one issue

ISSUE:

i need to check total metric values date wise .

if total metric value is zero in particular date then i need to restrict that date in variable level or in QVD Script level

note:

if metric is variable or some calculated columns then how i call in script level

please see the attested QVW file

Regards,

brahma

13 Replies
sunny_talwar

Not sure I understand what you want to do? Can you may be elaborate?

Gysbert_Wassenaar

If you want to filter them out in the script then add a where clause to the load statement:

LOAD * INLINE

[

country,Date, total,

China, 2/20/2016 12:00:00 AM, 0,

India, 3/20/2016 12:00:00 AM, 0,

JAPAN, 04/20/2016 12:00:00 AM, 92.03498%,

US, 05/22/2016 12:00:00 AM, 75.64532%,

PHILIPS,3/20/2016 12:00:00 AM, 0,

]

WHERE total <> 0;


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

hi Sunny T,

just i don"t  want to any thing on pivot .i want to modify date column only

like if particular date have any total value then i want to show that date other wise i need to hide

Gysbert Wassenaar

yeah your suggestion is perfectly working but i want date feild as well.in that i don"t want to any condition i want to display that dates as well because i am using that date column in another charts.so i need to create new date field in that i need to put condition


Regards,

Bobs

sunny_talwar

Something like this?

Table:

LOAD * INLINE

[

country,Date, total,

China, 2/20/2016 12:00:00 AM, 0,

India, 3/20/2016 12:00:00 AM, 0,

JAPAN, 04/20/2016 12:00:00 AM, 92.03498%,

US, 05/22/2016 12:00:00 AM, 75.64532%,

PHILIPS,3/20/2016 12:00:00 AM, 0,

];

RestrictedTable:

LOAD country as country,

  Date as Date1,

  total as Total1

Resident Table

Where total > 0;


Capture.PNG

Anonymous
Not applicable
Author

TABLE1:

LOAD * INLINE

[

country,Date, total,

China, 2/20/2016 12:00:00 AM, 0,

India, 3/20/2016 12:00:00 AM, 0,

JAPAN, 04/20/2016 12:00:00 AM, 92.03498%,

US, 05/22/2016 12:00:00 AM, 75.64532%,

PHILIPS,3/20/2016 12:00:00 AM, 0,

];

TABLE2:

LOAD

country,

Date,

if(total<>0,Date) as Date2,

total

Resident TABLE1;

drop Table TABLE1;

Anonymous
Not applicable
Author

sorry to say this ,

Sunny T,

Robin Hausdörfer

in  my original dashboard both script condition are not working

sunny_talwar

How is your current script looks? Can you share your script?

Anonymous
Not applicable
Author

hi Sunny T,

you are helping a lot

please check  attached QVW file

aim:

i want to create a new date column.in that new  date column have some dates that dates must be contain some values.

and

some dates doesn't contains any data so that particular dates i don"t want to see in new date column.


let me know if you required more details then i will share

sunny_talwar

This is similar to the data you shared earlier. I don't understand what's the issue with some of the proposed approaches?

https://community.qlik.com/message/1021608?et=notification.mention#1021602