Forum Discussion
Two measures grouped together by year
I am trying to create a table or matrix with two measures by year. I want the same measures next to each other, separated by years, and the next measure next to the first, separated by year.
| Employees | Products | |||||||||||
| Client | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 |
| Kote | 9 | 12 | 15 | 13 | 15 | 12 | 1,000 | 1,200 | 1,011 | 1,231 | 1,312 | 1,101 |
| Braccio | 14 | 15 | 14 | 13 | 14 | 15 | 1,300 | 1,211 | 1,001 | 1,102 | 1,212 | 1,312 |
How can I make the table or matrix behave this way, rather than prioritizing years? Thanks.
Hi jsgambel ,
Thanks for reaching out to the Microsoft fabric community forum.Can you let me know which version of Power BI Desktop or Excel you’re using, and if you’re connected via live connection to the cube? That will help confirm why New Table is disabled.
Best Regards,
Community Support Team.
8 Replies
- AnonymousNot applicable
How is the data stored? In one table? Or seperate, or mulptiple
- jsgambelRegular Visitor
Tabular cube.
- Cookistador
Super User
Hi jsgambel
It is possible, but not so easy
To perform that, you will have to perform from steps
1) you have to create a disconnected table (a calculated table without any relationships)
Measure Created =DATATABLE("Measure Name", STRING,{{ "Employees" },{ "Products" }})Then, in the table where you have your measure (employees & products), create the following measure:
MeasureGroup =SWITCH(SELECTEDVALUE('Measure Created'[Measure Name]),"Employees", [Employees],"Products", [Products])And after that, you just have to create a matrix with the measure name (from the disconnected table) and the year in the colum
I joint the PBIX I created, do not hesitate to ask for more support 🙂
- jsgambelRegular Visitor
In my version, the New Table function is unavailable. ☹️
- v-menakakota
Community Support
Hi jsgambel ,
Thanks for reaching out to the Microsoft fabric community forum.Can you let me know which version of Power BI Desktop or Excel you’re using, and if you’re connected via live connection to the cube? That will help confirm why New Table is disabled.
Best Regards,
Community Support Team.