Forum Discussion

jsgambel's avatar
jsgambel
Regular Visitor
1 year ago
Solved

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     
Client201920202021202220232024201920202021202220232024
Kote912151315121,0001,2001,0111,2311,3121,101
Braccio1415141314151,3001,2111,0011,1021,2121,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

  • Anonymous's avatar
    Anonymous
    Not applicable

    How is the data stored? In one table? Or seperate, or mulptiple

     

  • 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 🙂

    • jsgambel's avatar
      jsgambel
      Regular Visitor

      In my version, the New Table function is unavailable.  ☹️

       

       

      • v-menakakota's avatar
        v-menakakota
        Icon for Community Support rankCommunity 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.