Hi all, I'm new to ADX and I need your support.
I used to use this query a week ago and it went well both in ADX and PBI
but somehow it shows an error today as attached in PBI (in ADX is still working).
Here is the query I used for reference.
let T1 = (
Quality_crqs_result
| where id_factory == "229" or id_factory == "232"
//| where fe_created >= datetime(2024-08-15)
| distinct id_factory,id_pqs_history,id_defect,nm_result_green,nm_result_yellow,nm_result_red,fe_created
|lookup kind=inner (vw_Quality_crqs
| summarize arg_max(nm_version,*) by id_defect
|where id_factory == "232" or id_factory == "229")
on id_defect
//| where id_defect in (24392
//,24391
//,24387
//,24380
//,24363
//,24342
//,24314
//,24286
//,24275
//,24262
//,24255
//,24248
//,24246
//,24243)
| distinct id_factory,id_pqs_history,id_defect,nm_result_green,nm_result_yellow,nm_result_red,fe_created,id_crqs,de_crqs,de_defect,id_category,de_category,id_subcategory,de_subcategory
);
T1
| join kind=inner hint.strategy=broadcast (Quality_crqs_historical
| where id_factory == "229" or id_factory == "232"
//| where id_pqs == 1723
//| where id_line == 50250
//| where dt_scheduled >= datetime(2024-08-15)
| where isempty(dt_modified) == false // remove non-numerics
| summarize arg_max(dt_modified,*) by id_pqs_observation
| distinct id_factory,id_pqs_observation,id_pqs,id_line,dt_scheduled,fl_shift,fl_state,dt_modified
)
on $left.id_pqs_history == $right.id_pqs_observation
| distinct fe_created,id_factory,id_pqs_history,id_defect,id_crqs,de_crqs,de_defect,id_category,de_category
,id_subcategory,de_subcategory,nm_result_yellow,nm_result_red,nm_result_green,id_line,fl_shift,fl_state,dt_scheduled,dt_modified
| lookup kind=inner hint.strategy=shuffle (Line
| summarize arg_max(fe_modification,*) by id_line
| where id_factory == "229" or id_factory =="232"
| where fl_active == 1
| where fl_deleted == 0
| distinct id_line,de_line,id_factory,fe_modification)
on id_line
| distinct fe_created,id_factory,id_pqs_history,id_defect,id_crqs,de_crqs,de_defect,id_category,de_category
,id_subcategory,de_subcategory,nm_result_yellow,nm_result_red,nm_result_green,id_line,fl_shift,fl_state,dt_scheduled,dt_modified,de_line
;