Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |