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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Amin_Adham
Regular Visitor

Measures created in a table, does not work and filter other tables.

Hello everyone.
I have been faced a problem as below details:

I have a timesheet table for our projects containing Month, Project Code and the total hours spent on each project monthly.

in another table, I have a financial transaction table which the costs, revenue, overhead etc are measured.
these two tables are not related in model.

the third table is connecting to both named project master.
it is a list of project with names and details (type, short name, code etc) which is connected to timesheet table through project code column and also to transaction table.

I want to create an allocated measure that allocates the overhead expenses to each project, based on the percent of their hours.

I created a measure for calculating the percent of total for each project as below:

Total Hours = CALCULATE(
    '01- Project Hours'[Hours],
    ALL(
        '01- Project Hours'[Project Code],
        '01- Project Hours'[Year],
        '01- Project Hours'[Month]
    )
)
and then:
Percent of total = '01- Project Hours'[Hours]/[Total Hours]

and it worked well. in hours table, i can use it for projects and months and it filters correctly.

but when I try to use this measure in my transaction table, it doesnt filter the projects

I now the problem is from my data Model, but please tell me how to fix it and what is the best data model for these kind of related tables.

2 REPLIES 2
amitchandak
Super User
Super User

@Amin_Adham , the above seem like a column not measure , measure should be like

 

Total Hours = CALCULATE(
Sum('01- Project Hours'[Hours]) ,
ALL(
'01- Project Hours'[Project Code],
'01- Project Hours'[Year],
'01- Project Hours'[Month]
)
)
and then:
Percent of total = divide(sum('01- Project Hours'[Hours]),[Total Hours])

 

Try the above and check

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Dear Amit and thanks for the respond and considration.

the measures are fine. I didnt use the SUM before '01- Project Hours'[Hours]  because it was a measure itself.

I forgot to mention I had another measure called: Hours wich is:

Hours = sum('01- Project Hours'[Hour])

So all my typings and formulas are just the same as you advised.
but when I use it on my other table, It doesnt filter them.

in it's own table, it's just working fine.
Amin_Adham_0-1684775216521.png

the next Measure I created is:

Allocated Overhead = CALCULATE[Overhead Expenses],  ALL( '00- JV List'[Month]))*[Percent of total]

Overhead expenses is also a measure:
Overhead Expenses =
CALCULATE(
    [Amount Dr (CR)],
    '00- JV List'[Title1]="Operational Expenses",
    '00- JV List'[Title4]= "Tehran Office"||
    '00- JV List'[Title4]= "Tenders"||
    ISBLANK('00- JV List'[Title4]||ALL('00- Persian Month'[Persian Month])))

here is the relationship between tables:

Amin_Adham_1-1684775434948.png

 

 

Kindly Please advise.

 

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.