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
Anonymous
Not applicable

Measure different grain

Hi everyone,

 

I have been working on Power BI for a few months and now reached a point where I really need help. So I hope you can and I already thank you for it.

 

Here is the situation :

 

My hierarchy is as follow :

 

Raw budget

ProjectPhaseBudget
A1x
A2x
A3x
A4x

 

Detailed budget

ProjectPhaseProductTaskTime Budget
A1auniqueIDx
A1auniqueIDx
A1buniqueIDx
A1buniqueIDx
A2auniqueIDx
A2auniqueIDx
B1vuniqueIDx
B1vuniqueIDx

 

Time tally table

ProjectPhaseProductTaskTime TallyDate
A1auniqueIDxddmmyyy
A1auniqueIDxddmmyyy
A1auniqueIDxddmmyyy
A1buniqueIDxddmmyyy

 

First I want to calculate the remaining time

I tried this :

 

Measure = VAR Timeleft = SUM ( DetailedBudget [Time] ) - SUM ( Timetally [time] ) 
RETURN
IF ( Timeleft > 0 ; Timeleft )

And its working when shown again the Task dimension but its wrong when I show it for a project (The total time spent is greater than the budget so this measure will show 0 time left when used with project dimension.

 

I kind of made it work with calculated columns but then the time left to do is not updating depending on the date slicer.

 

Then, I need to check for a given Phase, if there is no Detailed time budget then use the Raw Budget.

 

the result would be something like that:

 

ProjetPhaseRaw BudgetDetailed BudgetUsed BudgetTime spentTime left
A1101515114
A2201515213
A330 30327
A4403535431

 

 

Thank you very much for reading through this and please ask me if you need extra details. I'm so overwhelmed by this that just explaining it is difficult.

 

Cheers!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

1 REPLY 1
Anonymous
Not applicable

So I managed to solve it using SUMX and CALCULATE thanks to

 

https://community.powerbi.com/t5/Desktop/DAX-SUMX-REFERENCE-ANOTHER-TABLE/td-p/217040

 

Cheers.

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.