Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Unable to get the data in a specified format

Hello, I have a dataset and i need to build a dashboard on a specific format out of it.

 

Sharing a sample of the data

CATEGORYYEARSALESqty
X2023205
X2023103
Y2023106
X2024402
Y2024503
Y2024104

 

And this is the required format.

TY- THIS YEAR, LY- LAST YEAR.

Is there a way in power bi to achieve this?

3 Replies

  • Use field parameter and then drag in all required measures in that later use it in Matrix

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the respose Sir but I am just confused with the approach here.

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI Anonymous,

        I'd like to suggest you create a new table with these category values and use on matrix row and write measure formula to extract the current value and use them as conditions.
        In the expressions, you can use if statement to check current value and redirect to different expressions to lookup and summary raw table values and use on matrix value field.

        Regards,

        Xiaoxin Sheng