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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Fizi
Regular Visitor

POWER BI - Not able to add a new Calculated column.

Hi Dear ALL,

 

Look at the function below.  As you see there Userelationship function. Therefore I was not able to add a new calculated column.  I was able to add a new calculated column after removing Userelationship function. I don't know what the reason is.

ANNUAL_365_COST = CALCULATE(SUM('HRKT FULL'[AZN]),
FILTER('HRKT FULL', 'HRKT FULL'[ORTKOD]=RPRZ[ORTKOD]), DATESINPERIOD('HRKT FULL'[TARIX].[Date], TODAY(),-1, YEAR), 
USERELATIONSHIP(RPRZ[ORTKOD],'HRKT FULL'[ORTKOD]), 'HRKT FULL'[TURT]="CIXIS", RPRZ[VED] IN{"V","E","D"})
1 ACCEPTED SOLUTION
Fizi
Regular Visitor

Thanks for you reply.  I tested the same function several times to add a new column. However, I didn't get any errors with it. Instead, I just get a blank column called Column1. It would be better if I got an error about it. I wouldn't waste my time testing it multiple times. Thanks a lot.

View solution in original post

2 REPLIES 2
Deku
Super User
Super User

USERELATIONSHIP must be used in CALCULATE as a context modifier, which are doing. Please see this SQLBI post on using USERELATIONSHIP in calculated columns. 


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
Fizi
Regular Visitor

Thanks for you reply.  I tested the same function several times to add a new column. However, I didn't get any errors with it. Instead, I just get a blank column called Column1. It would be better if I got an error about it. I wouldn't waste my time testing it multiple times. Thanks a lot.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors