Forum Discussion

srisiva55's avatar
srisiva55
Frequent Visitor
3 years ago

Matrix Column Head Order

Hi have Data of Year field in below format 

Year

2019-20

2020-21

2021-22

2022-23

 

But when I used this field in Matrix column giving as   But business expecting 2021-22 first then 2020-21 also the values based on Year column. I tried various option but since this data with 2020-21 as not number I unable to do that. Please help on this.

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi srisiva55 ,

    You can create a dimension table with the proper orders as below:

    Then sort the column [Year] by [Order], create a visual as below screenshot. Please find the details in the attachment.

    In addition, you can refer the following link to get it:

    Sort a Column with a Custom Order in Power BI - RADACAD

    If the above one can't help you, could you please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

    How to provide sample data in the Power BI Forum

    And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards

  • srisiva55's avatar
    srisiva55
    Frequent Visitor

     

    Hi 

    Since you asked sample data , I provided in below also attached Screenshot to better understand the requirement that column order should be in below for matrix in power bi.

     

    For ex: if user selectes 2021-22 then order of matrix column should be 2021-22  then 2020-21 .. Currently it's showing 2020-21 then 2021-22 ..

     

    Also below fiscal year is dynamic , Should not be any static / constant values ..can expect new fiscal year 2023-24 .. In this case should display 2023-24 first then 2022-23 .  Any solution will be much appreciated .. 

     

     

    Asset TypeMetric NameFiscal YearAmount
    InternalProperty2020-214500
    InternalProperty2021-223400
    InternalProperty2022-232600
    InternalEquipment2020-215366
    InternalEquipment2021-227400
    InternalEquipment2022-234300
    ExternalProperty2020-213233
    ExternalProperty2021-223400
    ExternalProperty2022-233244
    ExternalEquipment2020-215366
    ExternalEquipment2021-22300
    ExternalEquipment2022-233244
    Cash EquivalantsProperty2020-213233
    Cash EquivalantsProperty2021-223244
    Cash EquivalantsProperty2022-233243
    Cash EquivalantsEquipment2020-217465
    Cash EquivalantsEquipment2021-228366
    Cash EquivalantsEquipment2022-238466