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
Heidilein
Helper I
Helper I

Return a distinct value from a column

Hi there,

I have a table looking like this:

IDanotherIDValidValue
1101.01.20230,5
2501.01.20231,5
3401.02.20232,5
4201.02.20233,5
1101.02.20230,55
2501.02.20231,55

 

And I am trying to return the value from column value by looking up the entries in column "anotherID" in column "ID". With my current measure, I do return the sum of "values", but I would like to have the filter also set on the valid date. 

See here my measure: 

 

CALCULATE(SUM(Table[Value]), ALL(Table), Table[anotherID.] IN VALUES (Table[ID]))
 
But this returns for ID 1 for example the sum of 0,5 and 0,55 --> 1,05
How can I add the Filter for the explicite date? I have tried to extend the calculate measure but nothing changes.
 
 CALCULATE(SUM(Table[Value]), ALL(Table), Table[anotherID.] IN VALUES (Table[ID]), Table[Valid]) --> does not return the right value.
 
Thanks for your help.
1 ACCEPTED SOLUTION
ERD
Community Champion
Community Champion

Hi @Heidilein , is this what you'd like to achieve?

ERD_0-1701271412314.png

v1 = CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ), 'Table'[anotherID] IN VALUES ( 'Table'[ID] ), VALUES('Table'[Valid]) )

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

2 REPLIES 2
Heidilein
Helper I
Helper I

Thank you!

ERD
Community Champion
Community Champion

Hi @Heidilein , is this what you'd like to achieve?

ERD_0-1701271412314.png

v1 = CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ), 'Table'[anotherID] IN VALUES ( 'Table'[ID] ), VALUES('Table'[Valid]) )

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

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.