Forum Discussion
Upcoming Dates from Multiple Tables
- 4 years ago
Hi ReadTheIron ,
I think you got 2 options here.
1) Append both tables in the Query editor, so it will become one table.
2) Create a third table containing all the items to create a relationship between these tables.
If I answered your question, please mark it as a solution to help other members find it more quickly.
- 4 years ago
Hi, ReadTheIron
jppv20 mentioned two good solutions above.
ReadTheIron It should be noted that if you append two tables, the column names in the tables must be the same. You need to make the first column of the two tables the same, such as items.
The second solution above seems to be perfect, but I doubt that it is complicated to get the dates of two tables at the same time in one measure. ReadTheIron If I were you, I would suggest to create a calculation table, first filter the two tables and then summarize the filtered tables to get a new table.
Result:
Items = var _t1=SELECTCOLUMNS(FILTER('Switches','Switches'[Inspection]>TODAY()),"Items",[Switches],"Upcoming inspection",[Inspection],"Repair",[Repair]) var _t2=SELECTCOLUMNS(FILTER('Circuits',[Inspection]>TODAY()),"Items",[Circuits],"Upcoming inspection",[Inspection],"Repair",[Repair]) return UNION(_t1,_t2)Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, ReadTheIron
jppv20 mentioned two good solutions above.
ReadTheIron It should be noted that if you append two tables, the column names in the tables must be the same. You need to make the first column of the two tables the same, such as items.
The second solution above seems to be perfect, but I doubt that it is complicated to get the dates of two tables at the same time in one measure. ReadTheIron If I were you, I would suggest to create a calculation table, first filter the two tables and then summarize the filtered tables to get a new table.
Result:
Items =
var _t1=SELECTCOLUMNS(FILTER('Switches','Switches'[Inspection]>TODAY()),"Items",[Switches],"Upcoming inspection",[Inspection],"Repair",[Repair])
var _t2=SELECTCOLUMNS(FILTER('Circuits',[Inspection]>TODAY()),"Items",[Circuits],"Upcoming inspection",[Inspection],"Repair",[Repair])
return UNION(_t1,_t2)
Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.