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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
paulb1985
New Member

Row totals identical to column total

Dear all,

 

There is probably a very easy solution to this issue, but I cannot find it after 1.5h of browing forum posts...

In PowerQuery (for Excel, not PowerBI, but should be the same principle), I have a file with spend data that includes columns like year, spend category, and supplier name, as well as the amount of spend.

The model contains the data table plus tables per dimension (supplier, category, and so on) which are linked in a many-to-one way.

paulb1985_0-1649945547202.png

The main table, "Full Data" is the basis for the dimension tables with unique values for "Categories", "Calendar", and the various "Vendors" tables. On a side note, you will see several vendors tables because I had to several steps of cleaning (trim, clean, remove double spaces, capitalise each word, etc.).

 

In addition, there is a measure to sum up all spend: CALCULATE(SUM('Full Data'[Sum invoice value (EUR)])).

 

There is no issue calculating the absolute spend per category per year:

abs spend by category by year.png

The calculation of % spend by category across years also works:

relative spend by category by year.png

What does not work, is calculating the spend per supplier per year - here, I get the grand total per year shown in every single supplier row.

Spend by supplier.png

Can someone please tell me what I have been missing?

 

Many, many thanks in advance, this is a great community!

 

Paul

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

There's no relationship between 'Vendors Cleaned Manually', which appears to be the active table, and 'Full Data'. If the Supplier column in your matrix visual is coming from 'Vendors Cleaned Manually' you would need to add a 1-to-many relationship to 'Full Data'

View solution in original post

3 REPLIES 3
johnt75
Super User
Super User

There's no relationship between 'Vendors Cleaned Manually', which appears to be the active table, and 'Full Data'. If the Supplier column in your matrix visual is coming from 'Vendors Cleaned Manually' you would need to add a 1-to-many relationship to 'Full Data'

@johnt75  thanks very much - that did the trick!

Aha, thanks very much. Have to try that once I get home. I thought the linking of one-to-many relationships in the various supplier queries would (indirectly) take care of that. Will let you know in case it works!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors