- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculating Net Retention
Hi All,
Struggling to calculate Net Retention in Power BI and looking for help/suggestions. I have 2 tables to compare:
Account | Period Contract | Value |
A1 | Oct 1, 2015 | $1,000 |
A2 | Oct 1, 2015 | $2,000 |
A3 | Oct 1, 2015 | $1,500 |
Account | Period Contract | Value |
A1 | Sept 30, 2016 | $1,100 |
A2 | Sept 30, 2016 | $1,900 |
A3 | Sept 30, 2016 | $1,600 |
A4 | Sept 30, 2016 | $1,500 |
A5 | Sept 30, 2016 | $1,300 |
What I really want to do is compare the SUM of Contract Value between these two tables but I NEED TO FILTER FROM TABLE 2 ACCOUNTS: A4 & A5 AS THEY ARE NOT PART OF THE ORIGINAL DATASET. In SQL I would have been able to use a NOT IN type function... feel like I'm missing something simple. Any help or suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To calculate Net Retention in Power BI by comparing the sums of Contract Value from two tables and excluding specific accounts from the second table, you can follow these steps:
Create Relationships: First, ensure you have relationships established between your two tables. Typically, you'd use the 'Account' field as the common link.
Use DAX: Create a measure to calculate the sum of the Contract Value from the second table, while excluding specific accounts.
Here's an example of how you might structure your DAX measure:
AdjustedSumTable2 =
CALCULATE(
SUM('Table2'[Value]),
NOT('Table2'[Account] IN {"A4", "A5"}),
RELATEDTABLE('Table1')
)
This formula calculates the sum of the Contract Value from the second table (Table2) but excludes accounts "A4" and "A5". It also considers only those rows of Table2 that have a corresponding row in Table1 (the original dataset).
Compare Values:You can then create another measure to compute the Net Retention:
NetRetention =
AdjustedSumTable2 / SUM('Table1'[Value])
This formula computes the ratio of the adjusted sum from Table2 to the sum of Contract Value from Table1.
Visualize in Power BI:
You can now use these measures in your Power BI reports to visualize the Net Retention.
It's worth noting that while you can create separate tables for your data in Power BI, a more structured approach might be to have a single fact table with a 'Period' dimension to segregate the data by date. This would simplify many calculations and would be more in line with best practices for data modeling.
____________
⭐️ Fabric Group Channel
⭐️ Microsoft Fabric Community
Please join the Power BI UX/UI User Group if you need help with dashboard design and usability
Join to Data Governance User Group
Join to DENEB and Power BI Enthusiasts User Group
Join to Data Fabric Best Practices User Group
Subscribe to my medium blog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To calculate Net Retention in Power BI by comparing the sums of Contract Value from two tables and excluding specific accounts from the second table, you can follow these steps:
Create Relationships: First, ensure you have relationships established between your two tables. Typically, you'd use the 'Account' field as the common link.
Use DAX: Create a measure to calculate the sum of the Contract Value from the second table, while excluding specific accounts.
Here's an example of how you might structure your DAX measure:
AdjustedSumTable2 =
CALCULATE(
SUM('Table2'[Value]),
NOT('Table2'[Account] IN {"A4", "A5"}),
RELATEDTABLE('Table1')
)
This formula calculates the sum of the Contract Value from the second table (Table2) but excludes accounts "A4" and "A5". It also considers only those rows of Table2 that have a corresponding row in Table1 (the original dataset).
Compare Values:You can then create another measure to compute the Net Retention:
NetRetention =
AdjustedSumTable2 / SUM('Table1'[Value])
This formula computes the ratio of the adjusted sum from Table2 to the sum of Contract Value from Table1.
Visualize in Power BI:
You can now use these measures in your Power BI reports to visualize the Net Retention.
It's worth noting that while you can create separate tables for your data in Power BI, a more structured approach might be to have a single fact table with a 'Period' dimension to segregate the data by date. This would simplify many calculations and would be more in line with best practices for data modeling.
____________
⭐️ Fabric Group Channel
⭐️ Microsoft Fabric Community
Please join the Power BI UX/UI User Group if you need help with dashboard design and usability
Join to Data Governance User Group
Join to DENEB and Power BI Enthusiasts User Group
Join to Data Fabric Best Practices User Group
Subscribe to my medium blog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't worry in Dax we have multiple function to achive this .
In basically DAX join give u blank value if rows are missing .
so in your calculation u can replace the blank with whatever value u want .
let me know if u want help from my end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Anonymous
I suggest you to add a calculated column into your second table =
HasNoConnection = COUNTROWS ( FILTER ( Table1 , [Account] = EARLIER ( [Account] ) ) < 1
Then you got a column that you can use in order to filter.
Rémi

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
03-20-2025 09:06 AM | |||
02-11-2025 12:40 AM | |||
10-22-2024 06:39 AM | |||
11-27-2024 05:54 PM | |||
09-19-2024 03:30 AM |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |