- 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
Calculated column that filters by row level based on a column from another table
I need to create a calculated column that will return a value based on whether the primary key equlas a foreign key, i.e Opportunity(ID) - Contract(Opportunity ID), AND if a specific expression in another column meets an argument, Contract(RecordTypeName) = "Contract Requested". Any help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file whether it suits your requirement.
RecordTypeName CC =
VAR _opportunitycondition =
COUNTROWS (
FILTER ( RELATEDTABLE ( Opportunity ), Opportunity[condition] = "yes" )
) <> 0
VAR _reasoncondition =
COUNTROWS (
FILTER ( RELATEDTABLE ( Reason ), Reason[description] = "acceptable" )
) <> 0
RETURN
IF ( _opportunitycondition && _reasoncondition, " Contract Requested" )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Opportunity table and Contracts are the only two tables Im working with. The relationship is one to many based on the columns Opporunity(ID) and Contracts(Opporunity ID). In the Contracts table, there are columns that specify the type of record associated with an Opportunity ID: Contracts Renwal, Contracts Request, Pre-sales request, etc..I need to create a column in the Opportunity table that lists the record type for the Opportunity ID but identifies only opporutnity IDs that DO NOT have a contract request.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
02-16-2024 10:07 AM | |||
11-27-2023 07:37 AM | |||
11-08-2023 11:58 AM | |||
07-01-2024 05:02 AM | |||
05-22-2023 08:33 AM |
User | Count |
---|---|
24 | |
13 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
14 | |
13 | |
12 |