Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hello ,

can anyone help me generate a formula to display data from the beginning of the year to the current selection( NOT CURRENT DATE).

ex: input data

jan- 2

feb-3

march-5

so if we select, the output should be:

jan=2

feb=5

march=10

4 Replies
Not applicable
Author

Try this,

set a variable like vyear = '>=' & Date(YearStart(Today())) & '<=' & Date(Today())

and in your expression, give like SUM({<Month=, Date={"$(vyear )"}>} output field name)

Make sure you have proper calendar with year, month, date...

HTH

Anonymous
Not applicable
Author

if([DateField]>=date(yearstart(today())) and [DateField]<getselected([DateField]),[DataField],Null())

I haven't tested this but that is the logic I would start with.

Not applicable
Author

Hello Thanks for your response; but i think your solution will give till the current date; but is actuallly expected is:

if the Month: "Feb " is selected now, data should get populated only TILL FEB data ie(though we are in June, if i select FEB, data should be from Jan 1st to Feb 28th)

Not applicable
Author

the above solution will work as per your selection only.

if you select feb, it will give data from year start till feb.

have you tried the above expression??