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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Palace27
Regular Visitor

Create a Summary table based on other table

Hello

 

I have a table to followup project's costs, with one line per Purchase order /invoice, having one column as well for the budget. I would like to have a summary table with one line per project summarizing all numbers, as here below:

 

power BI tables.PNG

 

I think it is self explanatory but just in case:

  • "Amoun in PO" and "Amount in Invoice" would be a total sum per project
  • "Total spent" is PO+Invoice totals
  • "Budget" is the one that is repeated every row of the correspondin project
  • "Remaining Budget" is Budget-Total Spent

 

Thanks!!

Jose 

2 ACCEPTED SOLUTIONS
joaoribeiro
Kudo Kingpin
Kudo Kingpin

Hi @Palace27 ,

 

You can create a "Reference" to this table in Power Query in order to create the new one. After that, you can use the "Group By" option to group your data by "Project Id" with the desired aggregation function for each column. Please check screenshots below:

 

joaoribeiro_0-1680606384822.png

After creating the Reference, delete the columns that are not value and will not be used for the grouping (PO Number, for instance), and then select Group By:

joaoribeiro_2-1680606415685.png

 

Select a aggregation function for each column with values:

joaoribeiro_4-1680606549501.png

 

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

Thanks!

Best regards,
Joao Ribeiro

View solution in original post

DOLEARY85
Super User
Super User

Hi,

 

it looks like you could use a series of measures:

 

Measure PO Amount = if(isblank(calculate(sum(project[PO Amount]))),0,calculate(sum(project[PO Amount])))
 
Measure Invoice Amount = if(isblank(calculate(sum(project[Invoice amount]))),0,calculate(sum(project[Invoice amount])))
 
Total Spent Measure = [Measure PO Amount]+[Measure Invoice Amount]
 
Measure budget = max(project[Total Budget])
 
Remaing Measure = [Measure budget]-[Total Spent Measure]
 
DOLEARY85_0-1680606702358.png

 

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Hello @Syndicate_Admin you can create a dimension called "Projects" and connect it to your summary table, then you can create metrics that solve your problem

I leave here the PBI file,

example.pbix

If my answer seems valid, consider marking it as a solution 🙂.

DOLEARY85
Super User
Super User

Hi,

 

it looks like you could use a series of measures:

 

Measure PO Amount = if(isblank(calculate(sum(project[PO Amount]))),0,calculate(sum(project[PO Amount])))
 
Measure Invoice Amount = if(isblank(calculate(sum(project[Invoice amount]))),0,calculate(sum(project[Invoice amount])))
 
Total Spent Measure = [Measure PO Amount]+[Measure Invoice Amount]
 
Measure budget = max(project[Total Budget])
 
Remaing Measure = [Measure budget]-[Total Spent Measure]
 
DOLEARY85_0-1680606702358.png

 

joaoribeiro
Kudo Kingpin
Kudo Kingpin

Hi @Palace27 ,

 

You can create a "Reference" to this table in Power Query in order to create the new one. After that, you can use the "Group By" option to group your data by "Project Id" with the desired aggregation function for each column. Please check screenshots below:

 

joaoribeiro_0-1680606384822.png

After creating the Reference, delete the columns that are not value and will not be used for the grouping (PO Number, for instance), and then select Group By:

joaoribeiro_2-1680606415685.png

 

Select a aggregation function for each column with values:

joaoribeiro_4-1680606549501.png

 

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

Thanks!

Best regards,
Joao Ribeiro

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.