How can I sum values that appear in both of two Power BI tables i e intersection logic

0 votes

How can I sum values that appear in both of two Power BI tables (i.e., intersection logic)?

I need an automated way to sum values that appear in both tables using intersection logic in Power BI, ensuring that the data is consistently aggregated when new data is added.

6 hours ago in Power BI by Evanjalin
• 33,070 points
8 views

1 answer to this question.

0 votes

To sum values that appear in both tables in Power BI (i.e., using intersection logic), you can use DAX's INTERSECT function combined with SUMX for aggregation. Here's how you can do it:

Example:

Let’s say you have two tables, Table1 and Table2, and you want to sum values from a column that exists in both tables, for rows that are common between them.

SumIntersection =
SUMX(
    INTERSECT(
        VALUES('Table1'[KeyColumn]),
        VALUES('Table2'[KeyColumn])
    ),
    'Table1'[ValueColumn]  // Or you can sum from 'Table2' as needed
)

Explanation:

  • VALUES(): Returns a unique list of values from the specified column.

  • INTERSECT(): Finds the intersection of the two columns, i.e., the common values between the two tables.

  • SUMX(): Sums the values for the rows that are returned by the INTERSECT function.

answered 6 hours ago by anonymous
• 33,070 points

Related Questions In Power BI

0 votes
3 answers

How to create final table based on Joins of two tables in power BI?

To do so, follow these steps: From the ...READ MORE

answered Dec 16, 2020 in Power BI by Gitika
• 65,730 points
56,970 views
+1 vote
2 answers

How can I count the distinct values in a column using Power BI?

In Power BI, use the DISTINCTCOUNT DAX ...READ MORE

answered Nov 26, 2024 in Power BI by Anu
• 3,020 points
681 views
0 votes
1 answer

How can I track changes in data between two different time periods in Power BI?

To track changes in data between time ...READ MORE

answered Dec 18, 2024 in Power BI by anonymous
• 3,020 points

edited Mar 6 339 views
0 votes
2 answers

How can I set up cascading slicers in Power BI, where one slicer’s options depend on the selection of another?

Use the dependent slicers by making a ...READ MORE

answered Jan 23 in Power BI by anonymous
• 24,450 points
389 views
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,090 points
1,772 views
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 22, 2018 in Power BI by nirvana
• 3,090 points
3,134 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,520 points
1,936 views
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Open power bi report nd sign in ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited Mar 5 2,131 views
0 votes
1 answer

How can I combine two unrelated tables in a way that allows for cross-filtering in Power BI?

Cross-filter an unrelated table with another table ...READ MORE

answered Apr 1 in Power BI by anonymous
• 33,070 points
227 views
0 votes
1 answer

How can I reduce the dataset size of a Power BI model that keeps hitting memory limits on Power BI Service?

In order to shrink the Power BI ...READ MORE

answered Mar 11 in Power BI by anonymous
• 33,070 points
207 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP