Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

NetworkDays

Hi Everyone,

I'm working with the NetWorkDays functions and can't come up with the solution on how to get the underlaying working days to be displayed.

I'm using this formula:

=networkdays(Today()-14,Today())

This results in 11 workdays. I would like to change this a little bit, instead of 11 I would like it to say 14 and I would like to know which startdate and enddate it will return.

I have a transaction table and I would like to display my sales values for these 14 days (Not 11).

How can I found the dates and how can I display this in a chart?


Thanks

1 Solution

Accepted Solutions
CELAMBARASAN

You can achieve this using set analysis

Use DateField as Dimension

Expression as Sum({<DateField={">=$(=StartDateExpression)<=$(=EndDateExpression)"}>} Sales)

Make sure that StartDateExpression and EndDateExpression value date format is same as there in DateField.

View solution in original post

7 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

You can use LastWorkDate() to get the last nth working day.

=lastworkdate (today(), 14)

Hope this helps you.

Regards,

Jagan.

CELAMBARASAN

Check with firstworkdate and lastworkdate

Start date

=FirstWorkDate(Today(),14)

End Date

=LastWorkDate(FirstWorkDate(Today(),14),14)

Hope it helps

Celambarasan

Not applicable
Author

Hi,

Unfortunatly this will not work. You describe the earliest ending date but I want to go BACK 14 work days from today's date.

Then I would llike to get these dates presented as a dimension in my chart.


Thanks

TigerisBack
Champion
Champion

You can try below code

today()-(today()-14)

hope this helps

Not applicable
Author

Celambarasan,

Thanks. That helped me, now I have the start date and the end date. Any ideas of how I can display this in a chart with all the dates on the dimension and sales for each date as an expression?


Thanks

CELAMBARASAN

You can achieve this using set analysis

Use DateField as Dimension

Expression as Sum({<DateField={">=$(=StartDateExpression)<=$(=EndDateExpression)"}>} Sales)

Make sure that StartDateExpression and EndDateExpression value date format is same as there in DateField.

View solution in original post

Not applicable
Author

Thanks! It worked!

Sum({<DateField={">=$(=FirstWorkDate(Today(),14))<=$(=LastWorkDate(FirstWorkDate(Today(),14),14))"}>} Sales)