Forum Discussion
Calculated columns as axis & value
- 6 years ago
I ended up coming up with a solution for this. It doesn't maintain relationships but it works.
Totals Table = UNION( SUMMARIZE(Sheet4,"Cost",SUM(Sheet4[January 2020]),"Month","January 2020"), SUMMARIZE(Sheet4, "Cost", SUM(Sheet4[February 2020]), "Month", "February 2020"), SUMMARIZE(Sheet4,"Cost",SUM(Sheet4[March 2020]),"Month","March 2020"), SUMMARIZE(Sheet4, "Cost", SUM(Sheet4[April 2020]), "Month", "April 2020"), SUMMARIZE(Sheet4,"Cost",SUM(Sheet4[May 2020]),"Month","May 2020"), SUMMARIZE(Sheet4, "Cost", SUM(Sheet4[June 2020]), "Month", "June 2020"), SUMMARIZE(Sheet4,"Cost",SUM(Sheet4[July 2020]),"Month","July 2020"), SUMMARIZE(Sheet4, "Cost", SUM(Sheet4[August 2020]), "Month", "August 2020"), SUMMARIZE(Sheet4,"Cost",SUM(Sheet4[September 2020]),"Month","September 2020"), SUMMARIZE(Sheet4, "Cost", SUM(Sheet4[October 2020]), "Month", "October 2020"), SUMMARIZE(Sheet4,"Cost",SUM(Sheet4[November 2020]),"Month","November 2020"), SUMMARIZE(Sheet4, "Cost", SUM(Sheet4[December 2020]), "Month", "December 2020"))
Hi slauer12 ,
It seems that you want to unpivot table and create cumulative value in chart, right? If so, you could refer to my sample for details.
I unpivot columns and create a month column, the create a measure to cumulative value.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your reply dax.
Yes that is what I am trying to accomplish except I have an ever growing list of projects and can't manually enter data to manipulate. I could be wrong but that's what it looks like what you did to take the data from the calculated columns to power query. As some of these projects have not yet started and are getting updated all the time it would be very tedious to update the static information as well as change the dollar amounts each time something gets updated. For a frame of reference, I have roughly 400 projects that I am trying to do this for and the list is growing weekly and to be able to keep up with it would be tough.
- dax6 years agoCommunity Support
Hi slauer12 ,
In my sample, there is no calculated column in it, I use M code to create new column, so you don't need to insert data manually, you could copy the M code from Advanced Editor , and use this in your report.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- slauer126 years agoFrequent Visitor
Oh I see. I overlooked this. Do you know of a tutorial where I can learn how to do this? I don't completely understand what the source line means and how to replicate it for my use. I understand the rest of the code but not sure where the json document is and how to figure out the long line for file.
- slauer126 years agoFrequent Visitor
I copied and pasted your code with a few edits to call the columns I need and I get list errors. How does it know which source to pull from? Is this because the long file name isn't pointing to the correct sheet?