cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Calculate sum IF conditions filled from another table

Hello peeps,

 

I am trying to create a measure "PROD-time_unit (h)" which gives me the sum of a collum ([time_unit (h)]). I only want to sum values, though, that have a higher value than 2 from a different (related table) collum.

 

To make this less abstract here more detail:

There is 'time_accounting'[time_unit (h)] and [configitem.class_id].

The ID is basically different groups and the time_accounting is linked to each group individually.

I now want to sum all the values from these groups.

I only want to sum values from [time_unit (h)] that have a higher ID from [configitem.class_id] > 2.

 

How is this possible? Does anyone have an idea?

I hope one of the explanations above will help understand the issue. Its actually quite simple, but I haven't yet found a way for DAX to do it.

 

All the best,

Julius

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Calculate sum IF conditions filled from another table

This should not be too hard. Assuming that there is a many to one relationship from the 'time_accounting' table to the other table with the  [configitem.class_id] column you could use an expression like the following:

 

= CALCULATE( SUM( 'time_accounting'[time_unit (h)] ), 'other table' [configitem.class_id] > 2)

View solution in original post

1 REPLY 1
Highlighted
Super User III
Super User III

Re: Calculate sum IF conditions filled from another table

This should not be too hard. Assuming that there is a many to one relationship from the 'time_accounting' table to the other table with the  [configitem.class_id] column you could use an expression like the following:

 

= CALCULATE( SUM( 'time_accounting'[time_unit (h)] ), 'other table' [configitem.class_id] > 2)

View solution in original post

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors