Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

convert sum of days into week\month

how to convert sum of days into week\month (InvoiceDate-OrderDate)?

Tags (1)
4 Replies
Highlighted
Not applicable

Re: convert sum of days into week\month

week(invoicedate) or month(invoicedae)

Highlighted
Creator III
Creator III

Re: convert sum of days into week\month

when i calculate InvoiceDate minus Orderdate i have a num value in days (10,20 or 100 days) i want to show this value in weeks or months.

Highlighted
Not applicable

Re: convert sum of days into week\month

When using "sum of days" you should work with Intervals. In QlikView Intervals are periods of time between two moments or just a quantity of time. For example, if I want to know the number of days between two dates:

     =Interval(Date('05/11/2013', 'DD/MM/YYYY') - Date('01/01/2013', 'DD/MM/YYYY'), 'D')

To know the number of weeks divide by 7, and months by 30. To know based on a sum of days, replace the dates substraction by your number.

Highlighted
Not applicable

Re: convert sum of days into week\month

Try below:


For Days: Num#(text(interval(InvoiceDate-OrderDate 'D')))


For Weekd: Num#(text(interval(InvoiceDate-OrderDate 'D')))/7