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

View all the Fabric Data Days sessions on demand. View schedule

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors