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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
kartiklal7
Frequent Visitor

Adjust Calculated Column Based on Value from Unrelated Table

Hi All, 

 

I have a calculated column which returns some text or blank based on the condition below. 

 

Calcuated Column =  IF (
        Opportunities[Stage of Opportunity]
            IN {
            "Open - SWA Still Active",
            "Open - SWA Expired - Post Grace Period",
            "Open - SWA Expired - In Grace Period"
        }
            || Opportunities[Stage of Opportunity] = "SWA Lost"
            && Opportunities[Reason] = "Available for Winback",
        Opportunities[RequestQuoteURL],
        ""
    )

 

 

I have another unrelated table which defines the role of the user in the following format:

kartiklal7_0-1662078150818.png

I want to adjust this calculated column above so that it only returns text if the user id is that of a partner. 

 

Any suggestions? 

 

2 REPLIES 2
amitchandak
Super User
Super User

@kartiklal7 , if first tbale has a column that can take user id

 

Calcuated Column = IF ( Opportunities[User ID] in summarize(Filter(Table2, Table2[Role] = "Partner"),Table2[User ID]) &&
Opportunities[Stage of Opportunity]
IN {
"Open - SWA Still Active",
"Open - SWA Expired - Post Grace Period",
"Open - SWA Expired - In Grace Period"
}
|| ( Opportunities[Stage of Opportunity] = "SWA Lost"
&& Opportunities[Reason] = "Available for Winback"),
Opportunities[RequestQuoteURL],
""
)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak ,

 

The first table does not have a column that can take user id and there is no relationship b/w the Opportunities and the User Table. Is there any other way? 

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

Top Kudoed Authors