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
Kenjoswe
Regular Visitor

New table based on a query

Hi,

I'm new to PowerBI Web and would like to create a new table based on the result of a query.

This is what I have:

let
  Source = INTAKT_VIEW,
  #"Grouped rows" = Table.Group(Source, {"Period"}, {{"Sum"each List.Sum([Intakt]), type nullable number}})
in
  #"Grouped rows"
 
How can I create a new table with two columns Period sumIntakt?
1 ACCEPTED SOLUTION

Hi @Kenjoswe ,

 

You can try this method:

Use the Group By:

vyinliwmsft_0-1669358068823.png

vyinliwmsft_1-1669358099228.png

The result is:

vyinliwmsft_2-1669358117557.png

 

Or you can download the Power BI Desktop:

Get Power BI Desktop - Power BI | Microsoft Learn

Hope this helps you.

 

Best Regards,

Community Support Team _Yinliw

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

8 REPLIES 8
Kenjoswe
Regular Visitor

Two tables. How can I save the aggregated table?

Original table

Period 

SumIntakt

 

120
120
230

 

Aggregated table

PeriodSumIntakt
140
230

Hi @Kenjoswe , The best solution is the below.

By creating a measure.

 Measure = CALCULATE(SUM('Table'[SumIntakt]),ALLEXCEPT('Table','Table'[Period]))

 

 

Regards,

Nikhil Chenna

 

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

Hi @Kenjoswe , 

 

There are three methods to solve this question:

 

Method 1:

New a measure:

Sumlntakt1 = CALCULATE(SUM('Table'[SumIntakt]),ALLEXCEPT('Table','Table'[Period]))

vyinliwmsft_3-1668392638293.png

 

Method 2:

vyinliwmsft_1-1668392472770.png

Method 3:

New a table:

TableS = SUMMARIZE('Table','Table'[Period], "Sumlntakt", SUM('Table'[SumIntakt]))
vyinliwmsft_0-1668392779179.png

 

Hope this help you.

Here is my PBIX file:

 

Best Regards,

Community Support Team _Yinliw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I got this:

Expression.Error: Token Literal expected.
Details
TableS = SUMMARIZE('INTAKT_VIEW','INTAKT_VIEW'[Period], "Sumlntakt", SUM('INTAKT_VIEW'[SumIntakt]))

Hi @Kenjoswe ,

 

I think you use the formula in the Power Query, you should use it in the Desktop -> New table:

 

vyinliwmsft_0-1668590748569.png

 

Best Regards,

Community Support Team _Yinliw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi,

I'm using the webversion so I don't have that function: 

Kenjoswe_0-1668772242521.png

 

Hi @Kenjoswe ,

 

You can try this method:

Use the Group By:

vyinliwmsft_0-1669358068823.png

vyinliwmsft_1-1669358099228.png

The result is:

vyinliwmsft_2-1669358117557.png

 

Or you can download the Power BI Desktop:

Get Power BI Desktop - Power BI | Microsoft Learn

Hope this helps you.

 

Best Regards,

Community Support Team _Yinliw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

AnkitKukreja
Super User
Super User

Hi! @Kenjoswe 

 

The problem is not clear. Can you please share sample data and expected result?

 

 

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

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