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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Limits in Composite Model

Hi,

 

I have a Direct query on a SQL database (StationID  |  SerialNo  |  StartHour) and an excel import for a shift schedule. Now I want to calculate a new column with the type of shift (morning, late, night). The two tables has a relationship on StationID.

 

But this is not possible. Are there any limits in a composite Model?

 

Best regards

Timo

3 REPLIES 3
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Based on my test, I can add the calculated column under composite mode successfully, could you please share us the detailed error info?

 

Here are 2 solved cases that failed to add calculated column in composite mode, probably helps:

 

Disabling aggregation: https://community.powerbi.com/t5/Desktop/Composite-model-calculate-column-group/td-p/561013

Upgrade to the latest version : https://community.powerbi.com/t5/Issues/Calculated-Column-using-Composite-Model-broken-in-September/idi-p/515383#comments

 

It’s preferred to share us more details if the issue still exist.  Thanks!

 

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

Hi @v-diye-msft ,

 

I am able to add a calculated column as well. 

My data structure is:

 

Table 1 (excel file)

LineIDPlantMorningStartLateStartNightStart
TSTTest61422
TST2Test271523

 

Table 2 (direct query)

LineIDSerial NoStart Hour
TSTabc10
TSTdef15
TST2xyz14

 

Now I want to add a calculated column "shift" based on the LineID

 

If 'Table 2'[Start Hour] smaller than 'Table 1'[Late Start] then "Morning" and filter by LineID. 

 

Any idea?

 

Best regards

Timo

Anonymous
Not applicable

Hi @v-diye-msft ,

 

I found a solution but it is not very nice.

 

I add three new columns with RELATED(MorningStart), RELATED(LateStart) and RELATED(NightStart). After that I add a fourth column with an IF - function 

IF(Start Hour < LateStart ; then ....)

 

But this is not possible with a direct query. Got an error by the RELATED columns.

"The column 'Tabelle1[MorningStart]' either doesn't exist or doesn't have a relationship to any table available in the current context."

 

BR 
Timo

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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