Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
in my calendar do I have an 'InvoicePeriodCounter' and every month has two invoice periods.
Though I want to show current month -1 it doesn´t work over the year end.
How do I create the counter for the month over all years?
Example:
jan15 1
jan31 1
feb15 2
.
.
dec31 24
jan15 25
jan31 26
etc
Period_counter:
Load distinct
[Flag] as [Flag1],
[InvoiceYearMonth],
[InvoiceMonthNum] as [InvoiceMonthCounter],
recno() as [InvoicePeriodCounter]
resident tPeriod_counter
order by [Flag] asc;
kindly
Håkan
Hi Håkan,
You can transform YearMonth in MonthID using AutoNumber([InvoiceYearMonth]). Then you can use MonthID-1 regardless of year.
Best regards,
David
i did not get you,
would you like to explain a bit more?
what is expected output?
In the period_counter table do I expect a new column with a counter like the example below.
oops! my Picture disappeared
Hi Håkan,
You can transform YearMonth in MonthID using AutoNumber([InvoiceYearMonth]). Then you can use MonthID-1 regardless of year.
Best regards,
David
Can you give a more clearer picture of your doubt??
Do you want counter value to increment by one for each entry with in a month or you want counter value to remain same for multiple entries with in a month??
Maybe this is helpful: http://community.qlik.com/message/563904#563904
- Marcus