Forum Discussion

mpw's avatar
mpw
Frequent Visitor
2 years ago
Solved

Create a Cross Reference Table for Fiscal Year

Hello!

 

I want to create a matrix table that sorts the months by my company's fiscal year. Our year starts in July, but when I insert the data, the months show up in alphabetical order. Is there a cross reference table I can create to help with this?

  • mpw 

    go to power query ,

    step1 : select the table dimdate , 

    step2 : add conditional column 

     

    step3 : 

    create an index column base on the monthname 

     

     

    once done

    go back to power bi--> table view

     

    select column monthname --> sortby column --> sort by the column you have added in power query.

     

     

    let me know if this works for you . 

     

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up πŸ‘ and mark it as the solution βœ…
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🀠

     

  • mpw 

    i think i know the problem .

     

    you need to convert the index column that you have creeated to number instead of text . 

     

     

    output : 

     

     

     

     

    let me know if this works for you .

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up πŸ‘ and mark it as the solution βœ…
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🀠

8 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    mpw 

    go to power query ,

    step1 : select the table dimdate , 

    step2 : add conditional column 

     

    step3 : 

    create an index column base on the monthname 

     

     

    once done

    go back to power bi--> table view

     

    select column monthname --> sortby column --> sort by the column you have added in power query.

     

     

    let me know if this works for you . 

     

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up πŸ‘ and mark it as the solution βœ…
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🀠

     

    • mpw's avatar
      mpw
      Frequent Visitor

      Hi Daniel29195 thank you for your reply!

       

      I am running into an issue with the sorting part. I notice that your screenshot for the conditional column says Table.TransformColumn, but mine says Table.AddColumn. What am I doing wrong?

      • Daniel29195's avatar
        Daniel29195
        Community Champion

        mpw 

        no no. dont take into consideration the M language. 

         

        you add a column from the add column --> conditional column .

         

         

         

    • mpw's avatar
      mpw
      Frequent Visitor

      also, in step 3, you put that I should create an index column but the screenshot is a conditional column. i am not sure what i am missing. the screenshot below are the columns i currently have.