Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to change date to MonthStart?

Hello,

The following is what we're using to create our date fields. How would I manipulate this to be the month start date?

Month(MakeDate(left(right('$(vVulnerabilityFile)',11),4),left(right('$(vVulnerabilityFile)',6),2))) AS MNTH,

Thanks!

14 Replies
sunny_talwar

May be this

Date(MakeDate(left(right('$(vVulnerabilityFile)',11),4),left(right('$(vVulnerabilityFile)',6),2))) as MonthStart

Anil_Babu_Samineni

What does this vVulnerabilityFile? And if Date would you create few dates so then we came to know. Seems complex we can achieve by default functions may be

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vishsaggi
Champion III
Champion III

What is the value you hold in vVunerabilityFile variable like i mean what is the date format that this variable holds.

You can use MonthStart(vVunerabilityFile) may be?

Not applicable
Author

this worked, thank you. I'm trying to limit a pie chart to only display one month worth of data. this is what i'm using as my expression but it's saying no data to display:

Sum({<MonthStart={$(=Max(Month))}>}CRITICAL)

Sum({<MonthStart={$(=Max(Month))}>}HIGH)

any ideas?

sunny_talwar

Add double or single quotes around...

Sum({<MonthStart={"$(=Max(Month))"}>}CRITICAL)

Sum({<MonthStart={"$(=Max(Month))"}>}HIGH)

Not applicable
Author

didn't work

sunny_talwar

My bad, you need to do Max(MonthStart)

Sum({<MonthStart={"$(=Max(MonthStart))"}>}CRITICAL)

Sum({<MonthStart={"$(=Max(MonthStart))"}>}HIGH)

vishsaggi
Champion III
Champion III

Sunny, i believe Ann is comparing Date with Month here right? I mean

MonthStart = Max(Month) ?

Not applicable
Author

It's still not working