Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
@parry2k Need help with formatting year and month. Currently tenure formats this way:
10.80 I was hoping to get it to: 10 years & 10 months
--------------------------------------------------------------
--------------------------------------------------------------
Solved! Go to Solution.
So, are you saying that if you have a number like 10.80 that you want to translate that to 10 years, 10 months? Is that what you are saying? If that is the case, you can use this:
Column = VAR __period = SEARCH(".",[Column1],1,BLANK()) VAR __years = LEFT([Column1],__period - 1) VAR __months = ROUNDUP(([Column1] - __years) * 12,0) RETURN __years & " years & " & __months & " months"
So, are you saying that if you have a number like 10.80 that you want to translate that to 10 years, 10 months? Is that what you are saying? If that is the case, you can use this:
Column = VAR __period = SEARCH(".",[Column1],1,BLANK()) VAR __years = LEFT([Column1],__period - 1) VAR __months = ROUNDUP(([Column1] - __years) * 12,0) RETURN __years & " years & " & __months & " months"
@Greg_Deckler Sorry, how do I separate year and month and separate lines? eg:
10 years &
10 months
Thanks for your help!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |