Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

showing 2016-Q1 to 2019-Q1 sales

Hi All,

I have sales data from 2016001 to 2020012.

date format is : 2016001 to 2020012.

I need to show only 2016-Q1 to 2019-Q4 in bar chart.

I have created two variables in script for starting quarter(2016-Q1) and ending quarter(2019-Q4).

It is working fine for year and month level data but for quarter only it is not working.

variables for year is:

Let less= Year(Today())-2;
Let great= Year(Today())+1;

expression for year is: Sum({$<[Fisc_Year]={">=$(=less)<=$(=great)"}>}Sales) 

Above expression showing values for : 2016,2017,2018 and 2019.

variables for Quarter  is:

Let vDateMin= Year(Today())-2 &'-'& 'Q1';
Let vDateMax= Year(Today())+1 &'-'& 'Q4';

 

I have used these variables in set expression but I m not getting data.

my expression is:

Sum({<[Fisc Qtr]={">=(vDateMin)<=(vDateMax)"}>} Salary)

 

please find attached files for reference.

Thanks in advance.

 

regards

venkey.

 

1 Solution

Accepted Solutions
Highlighted

May be try this (not recommended, but if you really want to)

=Sum({<date={">=$(less)<=$(great)"}, [Fisc Qtr] -= {"*-Q0"}>} Salary) 

View solution in original post

14 Replies
Highlighted
Contributor II
Contributor II

 
Highlighted
Contributor II
Contributor II

Below attached is qvw file for reference.
Highlighted

Why don't you use the same expression for when you Fisc Qtr as a dimension

=Sum({<date={">=$(less)<=$(great)"}, [Fisc Qtr]>} Salary) 

image.png

Highlighted
Contributor II
Contributor II

Thanks Sunny, It is working fine.

But my quarter field having 2016-Q1,2016-Q2----2017-Q1--2018-Q0,2018-Q1,2018-Q2 till 2019Q4.

here 2018-Q0 is having 2018001,2018002 till 2018012 i.e. it is having full year data.

I need to remove from the result dataset.

could you please give me solution for that requirement.

 

regards

venkey.

Highlighted


@venkey2847 wrote:

here 2018-Q0 is having 2018001,2018002 till 2018012 i.e. it is having full year data.


2018-Q0? Where do you see this? I am not sure I understand what you are looking to do?

Highlighted
Contributor II
Contributor II

I am telling that in my quarter field I have, so I need to remove.

 

regards

venkey.

Highlighted

Are you saying that in your orginial app you have a field value 2018-Q0 and you would like to remove it from your table?
Highlighted
Contributor II
Contributor II

Yes Sunny.

Highlighted

This seems like a data issue. Would you be able to share a sample to see why you might even have 2018-Q0 🙂