Forum Discussion

diskovered's avatar
diskovered
Helper III
6 years ago
Solved

Concat Year + Month

I have this measure:
Age Year & Month = 'Get'[Age in Years] & " Yr " & " & " &'Get'[Age in Months] & " Mth "
 
This is obviously not the best way to show Year + Month, can you help me modify this measure to get the Year + Month in this format. Thanks
 
 
 

5 Replies

  • Cmcmahan's avatar
    Cmcmahan
    Resident Rockstar

    So what is your expected output?  3 Yrs & 35 Mth seems not right, but what do you want to display here? 2 Yrs and 11 Mth?  

    • diskovered's avatar
      diskovered
      Helper III

      Yes,  2 Yrs and 11 Mth should be the expected output. Thanks

  • Try

    QUOTIENT('Get'[Age in Months],12) & " Yr " & " & " & MOD('Get'[Age in Months],12) & " Mth "
      • amitchandak's avatar
        amitchandak
        Super User

        Which one has worked :) ? You seem to have marked your reply as a solution. In case there is a different solution please post and mark that as a solution.