Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
venkat1
Creator II
Creator II

I was facing a problem in the pivot table showing the values according to the calendar.

Hi,

I was facing a problem in the pivot table showing the values according to the calendar,

My Requirement is to show yesterday sales by Default and if i change the calendar sales should come accordingly to the date.

For the field "Gold Net wt" i had written an expression like :   =Sum({<VOU_DATE= {"$(=Date(Floor(Max(VOU_DATE)-1),'DD-MMM-YYYY'))"}>}fabs( G.NET_WT)). as it was showing correctly, but if i change the calendar from and to  date as 18/03/2019,Then result for the "Gold Net wt" is showing  17/03/2019 values, it because of expression i had return like (Max(VOU_DATE)-1),now if the change the calendar it should show the correct values as the date is selected.

How to overcome from this problem ?

Thanks in advance .

2 Replies
mrybalko
Creator II
Creator II

Hello @venkat1 

There are two main approaches: 

  1. Conditional expression statement. You create 2 expressions and show only one of them.
  2. Variable. Depending on selected dates count variable returns 0 or 1

Function GetSelectionsCount is used to determine application state. If there is no selection in Date field we use default algorithm and show previous date. Otherwise selected date is shown.   

venkat1
Creator II
Creator II
Author

hi

Still it wasn't rectified ,

There was an from and two date calendar and pivot table,

By Default pivot table should show yesterday sales record,if i change the from and two dates then values should come accordingly.