Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello experts
I need your help. I need the current month and the ongoing month of a selected year. Example: Today is 05/08/2021
Current formula only gives May. I need May until December of 2021:
Month(today([Delivery Date] + [Days]))
Any ideas?
Many thanks
tom
what do u mean by this???? " [Delivery Date] + [Days] " a condition is applied to ONE DIMENSION !
You can get the end of year using yearend()
Try using YearEnd(today()) or if you need the date dayname(YearEnd(today()) )
It would be sthing like :
sum({<MonthField, DateField ={>="$(=max(DateField))<=$(=yearEnd(max(DateField)))"}>}YourMeasure)
if u for example, select 5/8/2021, it would return,
sum(date betwwen 5/5/2021 and 31/12/2021)
if u select month Mars for example, the max date would become 31/3/2021 and thus expression would return the data between 31/3/2021 and 31/12/2021
Please take a look a this for a better explanation :
https://community.qlik.com/t5/New-to-Qlik-Sense/YTD-MTD-issue/td-p/1278297
Thank you Omar
I am getting this error. The end year 2023 is not too bad, but the starting value is incorrect. Any ideas?
Hi @TomBond77
Need to include date() function in set analysis
=sum({<MonthField, DateField ={>="$(=Date(max(DateField),'DD.MM.YYYY'))<=$(=yearEnd(max(DateField)))"}>}YourMeasure)
Hi Mayil
This formula is not working, no expression error but is not showing any result:
sum({<Month, [Delivery Date] + [Days] ={>=$(=Date(max([Delivery Date] + [Days], 'DD.MM.YYYY')
<=$(yearEnd(max([Delivery Date] + [Days])))}>} [Net Value])
Any ideas?
A dimension master item shows correctly the month in a table: =Month([Delivery Date] + [Days])
what do u mean by this???? " [Delivery Date] + [Days] " a condition is applied to ONE DIMENSION !
this expression give the correct month:
=Month([Delivery Date] + [Days])
Delivery Date is a date field. Days is a number, e.g. 15.
Now the following formula should become to work : sum({<Month, [Delivery Date] + [Days] ={>=$(=Date(max([Delivery Date] + [Days], 'DD.MM.YYYY')
<=$(yearEnd(max([Delivery Date] + [Days])))}>} [Net Value])