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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RonaldvdH
Post Patron
Post Patron

Is this possible ?

Hey guys, i need your help in this one

 

I have a table and i need a sort of lookupvalue formula based on 2 variabels (column 1 and 2) in table A and then search in table B and sums up the values based on these 2 variables

I already have a summarized table based on project name and week but how do i calculate the 'value' ?

 

Table A

Project

WeekValue

A

2020-02summarizes based on Project A ánd 2020-02
A2020-03summarizes based on Project A ánd 2020-03
B2020-02summarizes based on Project B ánd 2020-02
A2020-04summarizes based on Project A ánd 2020-04

 

Table B

ProjectWeekValue
A2020-02100
A2020-02100
A2020-02200
B2020-03200
B2020-04200
A2020-03150

 

1 ACCEPTED SOLUTION
CheenuSing
Community Champion
Community Champion

Hi @RonaldvdH ,

 

Try this.

 

Create a calculated column in TableA

 

Value =
                      Calculate (SUM(TableB[Value]),
                                 FILTER(TableB,
                                        TableB[Project]=TableA[Project] &&
                                         TableB[Week] = TableA[Week] ) )
 
Cheers
 
CheenuSing
Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
CheenuSing
Community Champion
Community Champion

Hi @RonaldvdH ,

 

Try this.

 

Create a calculated column in TableA

 

Value =
                      Calculate (SUM(TableB[Value]),
                                 FILTER(TableB,
                                        TableB[Project]=TableA[Project] &&
                                         TableB[Week] = TableA[Week] ) )
 
Cheers
 
CheenuSing
Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
PaulDBrown
Community Champion
Community Champion

@RonaldvdH 

 

There are a number of ways of doing this. Check out this thread for options:

https://community.powerbi.com/t5/Desktop/Use-Measure-to-Count-How-Many-Times-Value-Appears-in-Anothe... 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Pragati11
Super User
Super User

Hi @RonaldvdH ,

 

Have you got any relationship between these 2 tables?

If no, can you create a relationship between 2 tables on column "Project Name".

 

On the report, create a TABLE VISUAL, move "ProjectName" and "Week"  columns from TAble A and "Value" column from Table B with summarisation as SUM.

 

Please give kudos if this is helpful or Mark it as a Solution if this works! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11 unfortunately that is not possible because one of the 2 columns must have unique values

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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