Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - Creator III

How to get the max day of a month which should not vary with the selection of a day

Hello  Everyone,

I need help , i want to calculate the no of days left between the day i select and the max day of the month, the problem is if i write the max day of a month then i will get the selected day which i want in one case and a rigid day which is the  max day of  the month.

Thanks in advance.

Ferha Jafri

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     What I mean is you should create a Monthend Field in your data model, so that for each of the Date you get the Monthend Date.

     Say for example.

     Data:

     Load Date,

             Monthend(Date) as Monthend

     From xyz;

Now when ever you select one Date, you will get the Monthend for that Date in the Monthend field.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

9 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     In your master cal, create a new field called the Monthend Date.

     This way for each date you will have one Monthend Date mapped to that and this way your calculation will be easier.

Regards,

Kaushik Solanki    

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

try this

=monthend(today())

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

i did not get it you mean to say that i should implement month end function on Date to get the month end date.

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

i need month end for the selected month.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     What I mean is you should create a Monthend Field in your data model, so that for each of the Date you get the Monthend Date.

     Say for example.

     Data:

     Load Date,

             Monthend(Date) as Monthend

     From xyz;

Now when ever you select one Date, you will get the Monthend for that Date in the Monthend field.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

if your month field made on the PostingDate field

now

in a variable try this

vMonthEnd = Monthend(date(PostingDate))

Not applicable

Hi,

=Max({<Day=>}TOTAL<Month>Day)-Max(Day)

Try this in your expression.

saumyashah90
Specialist
Specialist

try

=MonthEnd(Date(DateField,'DD-MMM-YYYY'));

Not applicable

Hi,

Try this to count number of days b/w selected date and the max date of the selected month date:

Num(MonthEnd(DateField) - DateField,'#0')