Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello
I have two tables, one in which there is a list of devices (Devices table):
instrumentid | ver |
HPLC_00067 | 1 |
LC MSMS-00103 | 2 |
LC MSMS-00105 | 4 |
LC MSMS-00157 | 1 |
LCMSMS_00005 | 1 |
LCMSMS_00017 | 22 |
DEAC901944 | 1 |
HPLC-DAD-00100 | 2 |
The other contains a list of maintenance requests on the devices (Maintenance requests):
instrumentid | status |
HPLC_00067 | |
LC MSMS-00103 | Assigned |
LC MSMS-00105 | Canceled |
LC MSMS-00157 | Cancelled |
LCMSMS_00005 | Close |
LCMSMS_00017 | Draft |
DEAC901944 | Hold |
LC MSMS-00103 | Rejected |
LC MSMS-00105 | Resolved |
LC MSMS-00157 | Returned |
LCMSMS_00005 | SectionHead |
LCMSMS_00017 | SendBack |
DEAC901944 | Supervisor |
HPLC-DAD-00100 | Canceled |
How can I add a column to the first table (device list) that shows whether the device is available/unavailable because it is under maintenance, if there is a row in the second table and the status of the maintenance request is:
Assigned
Hold
Returned
SendBack
How can I put another column that shows the number of current maintenance requests?
Solved! Go to Solution.
pls try this
Proud to be a Super User!
what's the expected output?
e.g. for the second id, 003, there are two rows in the second table.
Proud to be a Super User!
expected output:
instrumentid | ver | Under maintenance | Number of maintenance requests |
HPLC_00067 | 1 | No | 1 |
LC MSMS-00103 | 2 | Yes | 2 |
LC MSMS-00105 | 4 | No | 2 |
LC MSMS-00157 | 1 | Yes | 2 |
LCMSMS_00005 | 1 | No | 2 |
LCMSMS_00017 | 22 | Yes | 2 |
DEAC901944 | 1 | Yes | 2 |
HPLC-DAD-00100 | 2 | No | 1 |
could you pls let me know how to get yes/no? what's the logic?
Proud to be a Super User!
yes/no Logic based on the presence of a line for the same “instrumentid” in the second table (maintenance requests), and “status” column must be = "Assigned" or "Hold" or "Returned" or "SendBack"
pls try this
Proud to be a Super User!
Okay, it worked!! Thank you very much. How could you do it without referring to the instrumentid column in the first table?
you are welcome. based on the attachment , you can see that i created relationship between two tables.
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
67 | |
64 | |
57 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |