Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a "little" issue. We are doing some asset accounting with qlikview.
Now I have a asset with Rest-useful live of 66 Month.
How can I reach, that not 66 month, but '5 years, 6 month' will be shown?
I tried several things but nothing worked.
Maybe someone has a solution for me.
Thanks in advance
Chris
use formula
=div(yourresult,12) & ' years' & mod(yourresult,12) & ' month'
not sure where you Need it; as Expression or as dimension
as Expression you may use dual function
use formula
=div(yourresult,12) & ' years' & mod(yourresult,12) & ' month'
not sure where you Need it; as Expression or as dimension
as Expression you may use dual function
Temp:
LOAD * INLINE [
Asset, Live
A, 66
B, 75
];
Final:
LOAD *,
div(Live,12) & chr(32) & 'Years' & ',' & chr(32)& Mod(Live,12) &chr(32) & 'Month' as MonthYear
Resident Temp;
DROP Table Temp;
Hope this example helps.
Regards,
Imran K
Wow, thank you very much it works perfectly
Hi Rudolf,
I have a Little additional issue.
Can you tell how to Show only the years, when I have Zero additional months?
i.e.: I have 36 Month - with your Expression only "3 years" without the months-section will be shown.
Thanks in advance.
Chris
Hi Christian,
not exactly clear what you Need.
You have 36 months . WEHat do you mean with Zero additional months?
can you post sample?
Good Morning Rudolf,
here is my example. I have a "ND" of 2 Years and 0 Months.
In this Case (when the months are zero) only the the years should appear.
Thanks for your help in advance.
Chris