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.
I have a database with equipament status and its correspondent control status. I need to check if at each DateTime both Status (Equipment and Control) for each Equipment are equal.
For example, on first and second rows we have equipment 1. So if Status for Eq1_Status and Ctrl_Eq1_Status are the same, the result is set to 1, otherwise it's set to 0. Is it possible use a measure? How can I do that?
Thank you!
DateTime | Tag Id | Status | Equipment Id | Tag Type |
29/07/2022 12:00 | Eq1_Status | 1 | Equipment1 | Status Equipment |
29/07/2022 12:00 | Ctrl_Eq1_Status | 1 | Equipment1 | Status Control |
29/07/2022 12:00 | Eq2_Status | 0 | Equipment2 | Status Equipment |
29/07/2022 12:00 | Ctrl_Eq2_Status | 1 | Equipment2 | Status Control |
29/07/2022 12:05 | Eq1_Status | 1 | Equipment1 | Status Equipment |
29/07/2022 12:05 | Ctrl_Eq1_Status | 1 | Equipment1 | Status Control |
29/07/2022 12:05 | Eq2_Status | 0 | Equipment2 | Status Equipment |
29/07/2022 12:05 | Ctrl_Eq2_Status | 1 | Equipment2 | Status Control |
29/07/2022 12:10 | Eq1_Status | 1 | Equipment1 | Status Equipment |
29/07/2022 12:10 | Ctrl_Eq1_Status | 1 | Equipment1 | Status Control |
29/07/2022 12:10 | Eq2_Status | 0 | Equipment2 | Status Equipment |
29/07/2022 12:10 | Ctrl_Eq2_Status | 1 | Equipment2 | Status Control |
Solved! Go to Solution.
I'm not sure if this is an option for your situation but this is much easier if you pivot the [Tag Type] column in the Query Editor so that the data looks like this:
I'm not sure if this is an option for your situation but this is much easier if you pivot the [Tag Type] column in the Query Editor so that the data looks like this:
Hi @AlexisOlson
Could you please explain how you applied pivot?
I tried what is shown below but I didn't get the same result.
EDIT:
I just realized you deleted [Tag Id] column. So I deleted this column before pivoting [Tag Type] and it worked.
Thank you!
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 |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |