Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
is it possible to turn the day in month with Qlik Sense function?
Ex:
I have 50 days, how many months do they match?
Thanks
Your optimal solution could maybe be achieved using
= Div(Days,30) & ' month(s) and ' & Mod(Days,30) & ' day(s)'
What would be the correct answer here? I mean days vary from month to month. What if you have 31... is that 1 month or 1 month and 1 day?
I want formula that turn day in month!!!!!
I understand... but can you tell me what the answers for these need to be? I am just trying to understand the logic
Days Months
50
31
61
60
90
91
Fill in the blanks
Stefania,
there is no common definition how to translate days to months, you would need to specify your definition / requirement.
For examples, have a look at
How Do I Get the Number of Months Between Two Dates?
edit: if you only have the number of days, no dates to work with, I would probably just do an approximation using a division by 30.5:
LOAD
Days,
Days / 30.5 as Months,
....
The optimal solution would be:
Days Months
50 1 month and 20 day
31 1 month and 1 day
61 ....
60 ....
90 ...
91 ....
Thank you!
Your optimal solution could maybe be achieved using
= Div(Days,30) & ' month(s) and ' & Mod(Days,30) & ' day(s)'
Great!!!!!!!!!!!!!!!!
thank you