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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
ITManuel
Responsive Resident
Responsive Resident

Filter issue

Hi all,

 

I have the following 3 tables:

Data.JPG

"PCosts" is my fact table for project specific costs, "PList" my dimension table via which I'm filtering the fact table.  

In the fact table "PCosts" there are also Project additions (PA's) which do not appear in the "PList" table but which have to be considered also for certain projects. The table "Padd" defines how these PA's and their related costs would need to be considered for the project specific cost analysis i.e. to which projects they belong to. 

 

For example the total cost for P1 would be:

523

but for P2: 448+523+448+523+5662+432 = 7996

 

Is there a way that the PA's are automatically considered for the cost summary as per the table "Padd"?

 

A pbix test file is availabe under the following link.

 

https://we.tl/t-pTV0Ul20tI

 

Thanks in advance

 

Best regards

 

 

 

1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

The combination is incorrect.

You must join ProjectID into Padd-valued Pcosts (taking advantage of unpivot)

View solution in original post

4 REPLIES 4
ITManuel
Responsive Resident
Responsive Resident

Shame on me. 🙈

 

Thanks a lot.

HotChilli
Community Champion
Community Champion

The combination is incorrect.

You must join ProjectID into Padd-valued Pcosts (taking advantage of unpivot)

HotChilli
Community Champion
Community Champion

I think you could Unpivot the columns in  Padd.

Merge Padd and Pcosts to bring the ProjectID from Padd into Pcosts.  Add a column - if 'themergedcolumn' is null use ProjectID else 'themergedcolumn'. Call the column MasterProject.

It'll look like this

Screenshot 2020-12-03 012202.png

 

Then in powerbi Model view you can have a 1:m between ProjectID in Plist and MasterProject in Pcosts.

The project cost is a simple SUM from there.

 

Good luck.

@HotChilli ,

 

thanks for your respone.

 

I have issues to implement your proposed solution. It do not get a suitable merged table, from what I understand. This is what I did.

 

1. Original Padd Table

Original Padd.JPG

2. Unpivoted Padd Table

Unpivoted Padd.JPG

3. Original PCosts Table 

Original PCosts.JPG

4. Merging Pcosts with Padd

Mergin PCosts and Padd.JPG

5. Merged Table

Merged Table.JPG

In this merged table, I get 25 rows instead of the 20. I tried what you suggested with an additional column on this table but cannot get to the result as per your table. 

What am I doing wrong?

 

Best regards

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.