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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mrothschild
Continued Contributor
Continued Contributor

Clustered column chart with unpivoted data

I'm importing financial statement data from Quickbooks into Excel and then into PowerBI.  The data comes pivoted in Excel and then I unpivot in PowerBI to analyze it, so the basic form of the unpivot is a column of "Month" and a column of "Value", though the line item descriptors (e.g., sales, wages, travel expenses) and broad categories (e.g., revenue, expense, profit) remain as separate columns.  When I try to chart the data, it's summing everything, including revenues and expenses, and double-counting the sub-total lines.  

 

Any suggestions on how to create measures or calculated columns to visualize this data without this double-counting issue?

 

Example date is below:

Line ItemQ1 Q2 
   Sales8500050000
Total Income8500050000
Gross Profit8500050000
   Advertising & Marketing224136
   Bank Charges & Fees 124
   Insurance - Health60726072
   Insurance - Professional and Other249282
   IT Equipment and Services15262
   Legal & Professional Services 1822
   Meals & Entertainment - Client3161
   Office Expenses  
   Office Supplies & Software 12
   Taxes & Licenses  
      Taxes26162319
      Wages4738155662
   Total Payroll Expenses4999957981
   Travel25015
   Travel Meals14 
Total Expenses5685366767
Net Operating Income28147-16767
Net Income28147-16767
3 REPLIES 3
ImkeF
Super User
Super User

Hi @mrothschild ,

if you're using data with aggregations already, you cannot use the Matrix-visual, as it will create additional aggregations.

So you can filter out the subtotals first and then perform aggregations on the line items instead.

 

If you just want to display the data and don't need an expandable hierarchy, you can use a table visual instead with your full data.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur 

This link shows the essence of what I'm trying to accomplish: https://www.quora.com/How-do-I-combine-bar-graphs-of-stacked-and-unstacked-columns-in-single-chart-i...

 

And this one has the step-by-step in Excel: https://peltiertech.com/clustered-stacked-column-bar-charts/

 

From the data in my original post, I'd like to show, as an example, a stacked bar chart that looks, illustratively like the following:

 

                     [Insurance]t-1               [Insurance]t

                     [Bank Fees]t-1              [Bank Fees]t

                     [A&M]t-1                      [A&M]t

                     3Q18                             3Q19

 

but where the time periods can be drilled down and the prior period will change dynamically so that I can compare versus prior month, quarter, year, or budgeted forecast, based on a slicer.  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.