Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
durga_bi13
New Contributor

my date filter -7 days no working n straight table

i have date filter like start date and end date

For Start Date filters are like -7 days and  -21 days

For End date as +7 days and +21 days

 

I have a straight table which contains Product id and year basis sales like sales date, and 2017 sales,2018 sales,2019 sales.

In the straight table sum of year based sales are calculated based on sales date between start and end date.

My expression in straight table

sum({<StartYear ={'$(vLY2)'},TempDate = {"<=$(=Date(max({<StartYear={'$(vLY2)'}>}[End Date])+$(vEnd)))>=$(=Date(min({<StartYear={'$(vLY2)'}>}[Start Date])-$(vStart)))"}>}Sales)

start year- year of start datae

vLY2- Today()-2

 

for filter '-7',  i have three actions

select in field -field name is  [Sales Date] , search in string is   =if(YearPeriod= StartYear,date(min([Start Date])-7))

set variable variable- vStart,  value = 7

select in field - Field is negative which is created on inline basis with value -7

 

In my straight table i get year basis sales between start and end date based on year

if my default min (start date) is 1/1/2018 and my end date with 2/1/2018  it displays records in straight table with this interval for each product

on clicking to -7 , i need to get sales from 12/25/2017. so the sum of values need to get added in existing year based sales.

1 Reply
Highlighted
durga_bi13
New Contributor

My date filter not working on my straight table

i have date filter like start date and end date

For Start Date filters are like -7 days and  -21 days

For End date as +7 days and +21 days

 

I have a straight table which contains Product id and year basis sales like sales date, and 2017 sales,2018 sales,2019 sales.

In the straight table sum of year based sales are calculated based on sales date between start and end date.

My expression in straight table

sum({<StartYear ={'$(vLY2)'},TempDate = {"<=$(=Date(max({<StartYear={'$(vLY2)'}>}[End Date])+$(vEnd)))>=$(=Date(min({<StartYear={'$(vLY2)'}>}[Start Date])-$(vStart)))"}>}Sales)

start year- year of start datae

vLY2- Today()-2

 

for filter '-7',  i have three actions

select in field -field name is  [Sales Date] , search in string is   =if(YearPeriod= StartYear,date(min([Start Date])-7))

set variable variable- vStart,  value = 7

select in field - Field is negative which is created on inline basis with value -7

 

In my straight table i get year basis sales between start and end date based on year

if my default min (start date) is 1/1/2018 and my end date with 2/1/2018  it displays records in straight table with this interval for each product

on clicking to -7 , i need to get sales from 12/25/2017. so the sum of values need to get added in existing year based sales.