I may be jumping the gun here. I just finished Section 3 on Power BI so I'm going to jump over to Power Pivot as directed. But I'm stuck on combining data across tables with relationships. Here's (a simplified version) of what I'm trying to do:
I've pulled into PowerQuery the following:
- Invoices we sent to customers (a fact table)
- Bills we received from vendors (a fact table)
I've added a Dim table called Account Type (includes only Income, COGS, & Expense) and I imported a Dim table called Customers.
I set up a Matrix visual. I have my customers in rows. I have my Account type as columns. When I added my invoice amounts and Bill amounts as values, I get 6 columns. Invoice & Bill for Income, Invoice and Bill for COGS, Invoice and Bill for Expense.
I just want 3 columns. Income, COGS, Expense. And then I want to add some calculated columns ([Income] - [COGS], for example). But as you can see in the screenshot, it gives me lots of columns. And it won't let me add calculated columns across tables, even though I have relationships established.
I feel like I'm maybe missing something in my understanding of relationships, but maybe not as I'm not exactly sure what's preventing me from doing what I'm trying to.
I'm including my relationship table. It's a little complicated because my data is from QuickBooks and I have to link customer names to invoices and bills, items to accounts, etc.
Is there some concept here that I'm just completely missing or misunderstanding?
Hi Nate,
The behavior is similar to any pivot table: If you have Account Type as columns, for each account type all measures in the Values area will show up: Invoice and Bill. If you keep in Values area only one measure, then only one of them will show for each account type.
Hi Nate,
As Catalin explained, this is by design. To fix this you would have to merge the Invoice Line Amount and Bill Line Amount columns together into a single column. You could add another attribute column to differentiate these amounts by Bill and invoice if you needed a way to separate them for other purposes.
Mynda
Thank you, Mynda and Catalin. I think I need a deeper understanding of relationships. I've just finished the Power Pivot course and I'm going to go back and re-create my Power BI data in Power Query with the knowledge I've gained.
I'll post again if needed. 🙂