March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi.
Please help, I am going crazy.
i have a table "spotchecks" which contains data from a form based on whether staff are meeting certain outcomes (O1-O31) when completing their work. They have 3 workflows being checked (PCP, SF, INV).
The table columns are in the the following format:
name: "staff name"
PCPO1="yes","no"
PCPO2="yes","no"
PCPO3="yes","no"
PCPO4="yes","no"
PCPO7="yes","no"
SFO4="yes","no"
SFO5="yes","no"
SFO6="yes","no"
INVO4="yes","no"
INVO6="yes","no"
INVO8="yes","no"
SFO5="yes","no"
the O# in the table above relates to the outcome values in the table below.
i have another table "outcomes" which is in the following format:
outcome: "O1","O2","O3" etc
outcome text: "answers phone correctly" etc
i need to create a visual table that has the following columns:
outcome
outcome text
pcp
sf
inv
(with corresponding "yes", "no" answer next to the relevant outcome for pcp, sf and inv)
i have tried multiple relationships, bridging tables, measures and I cannot get it to work.
I would appreciate any advice.
Solved! Go to Solution.
Hi @Kmccnoodle ,
You first need to continue processing the table via the unpivot column function in the power query.
Then create the metrics using the following formula referenced below:
PCP =
CALCULATE(
FIRSTNONBLANK('ExtractedOutcome'[Value], 1),
'ExtractedOutcome'[Workflow] = "PCP"
)
SF =
CALCULATE(
FIRSTNONBLANK('ExtractedOutcome'[Value], 1),
'ExtractedOutcome'[Workflow] = "SF"
)
INV =
CALCULATE(
FIRSTNONBLANK('ExtractedOutcome'[Value], 1),
'ExtractedOutcome'[Workflow] = "INV"
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Kmccnoodle ,
You first need to continue processing the table via the unpivot column function in the power query.
Then create the metrics using the following formula referenced below:
PCP =
CALCULATE(
FIRSTNONBLANK('ExtractedOutcome'[Value], 1),
'ExtractedOutcome'[Workflow] = "PCP"
)
SF =
CALCULATE(
FIRSTNONBLANK('ExtractedOutcome'[Value], 1),
'ExtractedOutcome'[Workflow] = "SF"
)
INV =
CALCULATE(
FIRSTNONBLANK('ExtractedOutcome'[Value], 1),
'ExtractedOutcome'[Workflow] = "INV"
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Create a new column
Outcome = Text.Middle([Attribute], 4, 2) // This extracts "O1", "O2", etc. from "PCPO1", "SFO4"
To link the two tables in Power BI and create the visual table you need, here's a step-by-step approach:
Unpivot the Spotchecks Table: Since the outcomes are spread across multiple columns, you should unpivot the Spotchecks table in Power Query to bring the data into a more manageable format.
Extract the Outcome from the Unpivoted Data: Once unpivoted, you'll want to extract the outcome code from the Attribute column.
Link the Spotchecks and Outcomes Tables: Now, you have a column in the unpivoted Spotchecks table that contains outcome codes like "O1", "O2", etc. You can create a relationship between this column and the outcome column in your Outcomes table.
Create the Visual Table: In your visual, use the Outcome and Outcome Text from the Outcomes table, and the workflow-specific answers from the unpivoted Spotchecks table.
This approach should help you generate the desired visual by properly linking the outcomes with their respective answers for each workflow (PCP, SF, INV).
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
81 | |
62 | |
54 | |
41 |
User | Count |
---|---|
194 | |
106 | |
90 | |
63 | |
51 |