Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
adann_CB_96
Contributor II
Contributor II

Bar Chart - How to set a dimension with all months of a current year?

Hi, I am trying to count all contracts from a table and show it in a bar chart. As a dimensions I want to set all months of a CURRENT year, but I don't know why. Simple condition =MONTH([ISSUANCE DATE]) is not enough, I need to declare also a year: 2024, or YEAR(DATE(TODAY())). I tried with limitation, but without success.

Currently it counts contracts of all months from all possible years.

adann_CB_96_1-1724660560585.png

adann_CB_96_2-1724660650796.png

 

 

Labels (3)
1 Reply
poklegoguy
Creator
Creator

For Dimension, you can use the expression below and untick 'Include null values':
IF(Year([ISSUANCE DATE]) = Year(Today()), MONTH([ISSUANCE DATE)])

or by using set analysis in your measure expression, for example, if your measure is sum of field, use expression as below and just set the dimension as Month([ISSUANCE DATE]):
SUM({$<[ISSUANCE DATE] = {">=$(=YearStart(Today()))<=$(=Today())"}>} field)