Forum Discussion
Limits in Composite Model
Hi v-diye-msft ,
I am able to add a calculated column as well.
My data structure is:
Table 1 (excel file)
| LineID | Plant | MorningStart | LateStart | NightStart |
| TST | Test | 6 | 14 | 22 |
| TST2 | Test2 | 7 | 15 | 23 |
Table 2 (direct query)
| LineID | Serial No | Start Hour |
| TST | abc | 10 |
| TST | def | 15 |
| TST2 | xyz | 14 |
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
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