Forum Discussion
slauer12
6 years agoFrequent Visitor
Calculated columns as axis & value
I have a bunch of calculated dax columns that I want to show as a visual. If I use a normal bar chart I get the following image where because I do not have any fields in the axis field. The titles of...
- 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"))
dax
6 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 Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
slauer12
6 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?