Forum Discussion
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
| CATEGORY | YEAR | SALES | qty |
| X | 2023 | 20 | 5 |
| X | 2023 | 10 | 3 |
| Y | 2023 | 10 | 6 |
| X | 2024 | 40 | 2 |
| Y | 2024 | 50 | 3 |
| Y | 2024 | 10 | 4 |
And this is the required format.
TY- THIS YEAR, LY- LAST YEAR.
Is there a way in power bi to achieve this?
3 Replies
- mh2587
Super User
Use field parameter and then drag in all required measures in that later use it in Matrix
- AnonymousNot applicable
Thanks for the respose Sir but I am just confused with the approach here.
- AnonymousNot 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