Forum Discussion

roncruiser's avatar
roncruiser
Post Patron
5 years ago
Solved

Create new Table using Measures and selected Columns from Another Table

Hello,   I have a table in which I've created quite a few measures.   I'd like to create a new table using the current table columns highlighted in green, and include the measures highlighted in ...
  • parry2k's avatar
    5 years ago

    roncruiser try something like this:

     

     

    New Table =
    UNION (
    SUMMARIZE ( YourTable, YourTable[Column1], YourTable[Column2],YourTable[Column3], "Meas", "Meas0", "value", [Meas0 Measure] ),
    SUMMARIZE ( YourTable, YourTable[Column1], YourTable[Column2],YourTable[Column3], "Meas", "Meas1", "value", [Meas1 Measure] ),
    SUMMARIZE ( YourTable, YourTable[Column1], YourTable[Column2],YourTable[Column3], "Meas", "Meas2", "value", [Meas2 Measure] ),
    SUMMARIZE ( YourTable, YourTable[Column1], YourTable[Column2],YourTable[Column3], "Meas", "Meas3", "value", [Meas3 Measure] )
    )
    
    

     

     

    Follow us on LinkedIn

     

    Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

  • parry2k's avatar
    5 years ago

    roncruiser something like this then:

     

    New Table =
    UNION (
    SUMMARIZE ( YourTable, YourTable[Column1], YourTable[Column2],YourTable[Column3], "Meas", "Meas0", "Meas1", [Meas1 Measure], "value", [Meas0 Measure] ),
    SUMMARIZE ( YourTable, YourTable[Column1], YourTable[Column2],YourTable[Column3], "Meas", "Meas1", "Meas1", [Meas1 Measure], "value", [Meas1 Measure] ),
    SUMMARIZE ( YourTable, YourTable[Column1], YourTable[Column2],YourTable[Column3], "Meas", "Meas2", "Meas1", [Meas1 Measure], "value", [Meas2 Measure] ),
    SUMMARIZE ( YourTable, YourTable[Column1], YourTable[Column2],YourTable[Column3], "Meas", "Meas3", "Meas1", [Meas1 Measure], "value", [Meas3 Measure] )
    )

     

    Follow us on LinkedIn

     

    Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.