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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Cmorales
Regular Visitor

Budget vs. Actuals

Good afternoon everyone. A noobie here with Power BI. I'd like to graph budget next to actuals by month as a bar graph. Then the same info cummulative as a line graph above the bar. I'd like to be able to filter by project ID and/or by cost category. Notice each project ID has 15 cost categories assigned. Here's my issue, my data displays the month (budget and actuals) as columns, not rows as we usually see it. I really appreciate the help.

 

From this:

From thisFrom thisTo thisTo this 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Cmorales ,

 

On the query editor select all the actuals and budget columns and unpivot them, you will get two columns one with values another with category then use those column to make your chart. 

 

You may need also to add a date column.

 

Regards,

Mfelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @Cmorales ,

 

On the query editor select all the actuals and budget columns and unpivot them, you will get two columns one with values another with category then use those column to make your chart. 

 

You may need also to add a date column.

 

Regards,

Mfelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thank you so much @MFelix . I was pulled into another fire drill and just got back to this one. 

 

So for anyone else with this issue. The best approach is like @MFelix  said, highlight the columns and unpivot them. My data source is from excel so I created a table and unpivot the columns from power query built in excel. Delete all the value columns not related to what you just unpivot (as the rows will repeat and give you double or triple reporting on other data). I added a column for the Actuals Value, Budget Value and Forecast Value, then a column vlookup-ing dates from f_Jan to 01/01/19. That way am able to graph it. Then I followed this great thread on cummulative line graphs: https://community.powerbi.com/t5/Desktop/Flat-Line-in-Cumulative-Curve/td-p/191875 Many thanks to @GilbertQ  for this. 

Thanks for letting us know I am sure that it will help other people!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.