March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
My source is a spreadsheet with projects that have budgets over multiple years. See this thread and I was able to unpivot the columns so when I clicked the slicer for each year I was able to get only those totals.
Project Name | 2023 | 2024 | 2025 | Total |
Project 1 | 400 | 500 | 500 | 1400 |
Project 2 | 300 | 700 | 100 | 1100 |
Now my spreadsheet has a few more calculated columns like: Spent, and Remaining
Project Name | 2023 | 2024 | 2025 | Total | Spent | Remaining |
Project 1 | 400 | 500 | 500 | 1400 | 400 | 1000 |
Project 2 | 300 | 700 | 100 | 1100 | 100 | 1000 |
However, due to the Year columns being unpivoted the Spent and Remaining columns are not calculating in PBI correctly. In fact, the columns are adding the value for each year it is showing up in the Data tab, so it's looks like this in the PBI Table visual.
Project Name | 2023 | 2024 | 2025 | Total | Spent | Remaining |
Project 1 | 400 | 500 | 500 | 1400 | 1200 | 200 |
Project 2 | 300 | 700 | 100 | 1100 | 300 | 800 |
I tried using a measure for these, but I am getting the same results. I also tried removing the unpivot and then unpivitong the original year columns and also the Spent and Remaining Columns, but this didn't help.
If select "Don't Summarize" the values will display correctly however, then the totals at the bottom of the Table visual will not display as they are not summed.
Any suggestions would be appreciated.
Solved! Go to Solution.
Hi, @cmajewsk
You can try the following methods. Select the three columns except the year-Unpivot Other columns:
Result:
Is this the result you expect? If not, please advise what output you expect.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @cmajewsk
You can try the following methods. Select the three columns except the year-Unpivot Other columns:
Result:
Is this the result you expect? If not, please advise what output you expect.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I used the SUMX and GROUPBY functions located in this post to create measures and it seems to be working as long as there is data in the unpivoted rows. For example, it was not adding one specific row. As there were no values in the Years columns in that row, as there is no budget in any of the years. However, there is still total cost column as there was money spent in years past, so I added a 1 in one of the current years and it counts that row. I am still looking over the data to see if it’s accurate when summing at the bottom of the Table visual, as I am using this function to generate the Spent, Remaining and Estimated Total Cost.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |