Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Show only current-year in table.

Hi! I have a table with several measures. Like number of orders, average ordervalue and so on.

The dimension is months.

1. Is there any way I can make all columns just summarizing the values for the current year ? (By inserting some conditions for the table, just summarize if year = max(year) or similar.

2. If not, how do I write the set expression to get avg order value for current year. Year dimension is called "booking year".

This set expression works but I need it to only take into account current year;

Sum({$<[Booking ActualDate]={1}>}[Net Sales Amount])/sum({$<[Booking ActualDate]={1}>}counter_Order)

Labels (2)
2 Replies
Highlighted
Partner
Partner

assuming you have a year column add something like below

Year={"$(=Max(Year))"}

Highlighted
Creator III
Creator III

On a Data Load Editor, create a variable

LET vCurrentYear = Year(now(1));

On load script include

Load

Year(OrderDate)     AS OrderYear

.....

 

Then, on your chart expression

You can have something like SUM({<OrderYear={'$(vCurrentYear)'}>}[Sales Amount])