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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
UrAvgWally
Helper I
Helper I

Help required for Sum , with breakdown by project

Hi All,

 

I have a table , UnpivotCP with a list of projects , for this example I filtered on one project :

 

UrAvgWally_0-1661943647172.png

The table has multiple projects, funders and has values for period 1 to 13.

 

I have used formula's like  , where Setup[CP], indicates the current period, for this example 5.

CPActuals = CALCULATE(SUM(UnpivotCP[Value]),FILTER(ALL(UnpivotCP),UnpivotCP[PeriodNo]= MAX(Setup[CP])))
 
I have a KeyTable, Say RSKCL which has a Funder Column and department name , The department name being the slicer and so I can filter on the below table :
The Actual is based on the formula above, the RF is based on another table with same type of data but with budgets and so the same formula is used.
 
 
UrAvgWally_1-1661943887298.png

So the breakdown of the Amounts work fine, The Actual column is based on the DAX formula of CPActuals for this instance.

 

But when I try to create a number table, with the breakdown by project rather than Funder, I get the total amount , rather than the amount for each project as per below :

 

UrAvgWally_2-1661944030963.png

Any advice on how to make my dax formula work, not only by Funder but by project so I can imitate the same by project?

 

I would still like to use a slicer of the RSKCL[Department], which has an RSKCL[Funder] relationship with Unpivot[Funder]

 

Any help would be appreciated. Also, let me know if any further clarifications are needed 🙂

2 REPLIES 2
Greg_Deckler
Super User
Super User

@UrAvgWally So normally when you see results like that it means that you are missing a relationship in your model.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler , thanks for getting back to me I tried doing this : 

 

Step 1- Make a table with Summarize formula as per below :

 

 

UrAvgWally_1-1661949111587.png

 

Theen as Step 2, Created relationships:

 

UrAvgWally_2-1661949349507.png

Created a relationship with RSKCL for the Funder, and created a relationship of the ProjectNo. With UnPivotCP and UnPivotRF.

 

Step 3:

I used the table i created with the summarize formula,Table ProjectNoKey for the project No as the Column criteria when creating a table visual, and added to that two measures Which is:

 

CPActuals = CALCULATE(SUM(UnpivotCP[Value]),FILTER(UnpivotCP,UnpivotCP[PeriodNo]= MAX(Setup[CP])))
 
CPRF = CALCULATE(SUM(UnpivotRF[Value]),FILTER(UnpivotRF,UnpivotRF[PeriodNo]= MAX(Setup[CP])))
 
And the result is still same as per below : 
 
UrAvgWally_3-1661949680914.png

 

Any idea what I am doing wrong ?

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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