Forum Discussion

sgosselin's avatar
sgosselin
Frequent Visitor
4 years ago
Solved

Power BI Reading a String to get Value

Hello, I am creating a dashboard for a constuction firm that has thousands of jobs, each of them with an 7 digit job number. The first number of all the job numbers is the same, and the next two numbers represent the year. For example, a job number of 1209563 would be from 2020. What I am attempting to do is write a DAX measure that reads the job number column and returns the year of the job (from the second 2 numbers in the job number). 

 

Thanks!

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Try this

     

  • sgosselin's avatar
    sgosselin
    Frequent Visitor

    I have a follow up question, I want to create a measure that checks if the 4th character is a 9. I'm trying to edit the original mesure you sent me, but I'm having some trouble. How would you write that measure?

    Thank you!