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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors