Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
united2win
Helper III
Helper III

How to use Summarise or SummariseColumns ?

Hi, 

 

I have the following table with Dax calculated colums:

 

Unique IDPriceY1 Y2Y3
1300€03/02/202002/02/202202/02/2023
2300€03/03/202002/03/202202/03/2023
3300€03/04/202002/04/202202/04/2023

 

Basically, I want it summarized (grouped by)  like below:

 

Unique IDPrice"Renewal Date""Renewal Period"
130003/02/2020Y1
1

300

02/02/2022Y2
130002/02/2023Y3
230003/03/2020Y1
230002/03/2021Y2

...

Any help will be greatly appreciated

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @united2win 

 

You could create a new table by the following formula:

newtable =
VAR _a =
    SUMMARIZE ( 'Table', [Unique ID], [Price], [Y1], "Renewal Period", "Y1" )
VAR _b =
    SUMMARIZE ( 'Table', [Unique ID], [Price], [Y2], "Renewal Period", "Y2" )
VAR _c =
    SUMMARIZE ( 'Table', [Unique ID], [Price], [Y3], "Renewal Period", "Y3" )
RETURN
    UNION ( _a, _b, _c )

The final output is shown below:

v-yalanwu-msft_0-1620955686793.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.  

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @united2win 

 

You could create a new table by the following formula:

newtable =
VAR _a =
    SUMMARIZE ( 'Table', [Unique ID], [Price], [Y1], "Renewal Period", "Y1" )
VAR _b =
    SUMMARIZE ( 'Table', [Unique ID], [Price], [Y2], "Renewal Period", "Y2" )
VAR _c =
    SUMMARIZE ( 'Table', [Unique ID], [Price], [Y3], "Renewal Period", "Y3" )
RETURN
    UNION ( _a, _b, _c )

The final output is shown below:

v-yalanwu-msft_0-1620955686793.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.  

HotChilli
Super User
Super User

Assuming there are more rows in the desired table.

In Power Query, select the first two columns, right-click , choose 'Unpivot other columns'

Hi, 

The columns are calculated DAX columns, so they don't appear in power query. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors