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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Pivot table

I have this table on PowerBI which lists the budget and savings of 3 projects:

EashwarBalaji_0-1706192797638.png

I tried unpivot on Project, Budget and total savings to get the following table (Removed the "savings" in order to get just the year) :

EashwarBalaji_1-1706192890536.png

But what this does is counts the budget for a project multiple times (twice for A & C, thrice for B) on the sheets when i want to display the total project budget.

Is there a work-around for this? I want the total budget for a project only counted once, but savings to be in separate rows for each year.

Ideally i want something like this:

EashwarBalaji_2-1706193420413.png


P.S.: I cannot devide the budget by number of years (all projects dont run for equal number of months/dates year over year).

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

7 REPLIES 7
Ahmedx
Super User
Super User

pls try

Screenshot_2.png

Anonymous
Not applicable

Hi @Ahmedx,
Thanks for your reply. I tried your solution in my code and I got an Expression.SyntaxError: Invalid identifier error. I did exactly the same as yours, but I had 4 columns to summate instead of 2, so I changed that: 

EashwarBalaji_0-1706608069846.png

I tried removing 2 columns out of the ReplaceValues exactly same as your code, but I still got the same error.
From the pointer shown in the error, it doesn't look like an error with the wording of the code.

Can you please help me figure out what is the mistake here?

Thanks

you wrote the code incorrectly, please take a look at my code

Screenshot_2.pngScreenshot_3.png

Anonymous
Not applicable

I tried with just 1,1 as well. Doesn't seem to do the job.

 

EashwarBalaji_0-1706615719337.png

 

you write incorrectly give me your file I will help

problem with the name give this column a normal name without ()

Screenshot_5.png

Anonymous
Not applicable

Yup. That's it 
Thanks!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.