Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Partner
Partner

Show only current months dates in table.

Hi. I have one table with dates and then one column with net sales amount MTD. I use this expression which gives values from 1 october to 8 of october. Sum({$<$(vL.MTD)>}[Net Sales Amount]) However I still got a lots of other dates showing up so i need to filter on month and year in a filterpane to see the values I´m interested in. I have tried with different set expressions, sorting and so on to only show the dates for current month, but without success. Anyone having a suggestion? The Vl.MTD variable looks like: [Booking InMTD]={1},[Booking YearsAgo]={$(=min("Booking YearsAgo"))} Would try to stay away from flags if possible, risk to slow down the app?
3 Replies
Partner
Partner

Re: Show only current months dates in table.

Try

Sum({<DateField={">=$(=Num(MonthStart(Today())))<=$(=Num(Today()))"}>} [Net Sales Amount])

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Partner
Partner

Re: Show only current months dates in table.

Hi Vegar. Thank you, didn´t work unfortunately. I have also tried the expression:

 

Sum({$<$(vL.MTD)>}[Net Sales Amount])

 

Where the variable vL.MTD is:     [Booking InMTD]={1},[Booking YearsAgo]={$(=min("Booking YearsAgo"))}

What it shows right now is 1-10 but for every month in 2019.

So 1-10 jan 2019, 1-10 feb 2019, 1-10 mar 2019... 1-10 october 2019.

How do I change to only make it show 1-10 october 2019?

 

Partner
Partner

Re: Show only current months dates in table.

Hi Bobi,

You can create a variable and which returns the data for current month something like this "Month(max(MonthField))"

and use that variable in your expression where to want to show data only for current month something like this

=if(GetSelectedCount(MonthField)=0,sum({$<MonthField={"$(vCurrentMonth)"}>}Sales),
sum(Sales))

Change the expression accordingly.

Regards,
Puneet Agarawal