Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Main_Event Table:
id | Name | SO1 | SO2 | SO3 | SO4 | SO5 | Benefit1 | Benefit2 | Benefit3 | Benefit4 | Benefit5 |
1 | One | SO1 Strategic Objective | SO1 Strategic Objective | SO2 Strategic Objective | SO5 Strategic Objective | Benefit Type 1 | Benefit Type 10 | Benefit Type 17 | Benefit Type 19 | ||
2 | Two | SO2 Strategic Objective | SO2 Strategic Objective | SO2 Strategic Objective | SO5 Strategic Objective | SO5 Strategic Objective | Benefit Type 2 | Benefit Type 11 | Benefit Type 18 | Benefit Type 20 | Benefit Type 21 |
3 | Three | SO1 Strategic Objective | SO1 Strategic Objective | Benefit Type 3 | Benefit Type 12 | ||||||
4 | Four | SO2 Strategic Objective | SO3Strategic Objective | Benefit Type 4 | Benefit Type 13 | ||||||
5 | Five | SO3Strategic Objective | SO4 Strategic Objective | Benefit Type 5 | Benefit Type 14 | ||||||
6 | Six | SO4 Strategic Objective | SO4 Strategic Objective | Benefit Type 6 | Benefit Type 15 |
Pre_event_scores table
Posr_event_scores table
We run training events and each record in the Main_Events table is a different event. We use the id as an identifier. For each event we ask the client to identify which benefit they want to see improved. There are many benefits. Each benefit can be mapped to one of 5 high level Strategic Objectives (SO1, SO2, SO3, SO4, SO5). When the initial record is created we identify the SO for each benefit. Some benefits can map to the same SO.
Before the event we run a candidate survey to get the scores for each benefit (i.e. how they rate themselves against each one). The results are caputed for each Benefit and we use the Main_event table id -> to the EventID in the Pre_event_scores so its a one to many relationship - we can identify which set of survey responses relate to which record on the Main_event table.
After the event we run another survey asking the same questions, capturing the same data in the same way. The difference between the scores is our uplift. My Ask... I am using Power BI desktop to create a dashboard showing benefits realised for each event, and ideally by Strategic Objective.I have tried googling the answer but get no real guidance, so I hope you can point me in the right direction.
I have these tables in Power BI and can easily slice the results by id - so show benefit results for a single event - we can do that.But ... I cannot figure out how to show results for a specific Strategic Objective as they can appear in different columns. So if I wanted to show the overall uplift for say, Strategic Objective1, for say Events 1, 2 and 3 is that doable? Is our data structured in a way to even make it possible? So any help you can offer is appreciated even if it means restructuring the data as we are in the early stages of this, Apologies for the vague title but I am struggling how to articulate the issue. Many thanks
|
if it helps, I can upload a pbix file with some sample data and visuals
SO I tried to delete the columns from a copy of the table and just unpivoted the relevnt cols leaving the id col. That worked so the data unpivoted fine. However, because the id column is my primary key column that is on the ONE side of the one to many relationship to the other two tables (Pre and Post) I dont appear to be able to get the values of the relevant Event ID from those two tables now. Is that because there are multiple instances of the id in the main table?
@winwell , I think unpivot of columns can help
Use in blank query in power query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("nZE9D8IgEIb/CmHuIF9VVwdXhnYjHbQ5FYfWEPz690LjILkgaROOXO6Fe+4FYyijFdUDhL3RjDTeHTycbU/08Qq9t4+SwrOKyigkxA4GOFlP2vcNCEOFFaqsUWU7teoqQ3nI2udYGGeJkrOQV5IZORoaW92gS8g8Z5NNEW1eHCz9K/ITSX+BhuLJ8QiXIduPd1d4MDETLRFaILSK6AKg0XKua4XQEqHr2Nq+/gIWoGuEVt9jcXXdBw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [id = _t, Name = _t, SO1 = _t, SO2 = _t, SO3 = _t, SO4 = _t, SO5 = _t, Benefit1 = _t, Benefit2 = _t, Benefit3 = _t, Benefit4 = _t, Benefit5 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"id", Int64.Type}, {"Name", type text}, {"SO1", type text}, {"SO2", type text}, {"SO3", type text}, {"SO4", type text}, {"SO5", type text}, {"Benefit1", type text}, {"Benefit2", type text}, {"Benefit3", type text}, {"Benefit4", type text}, {"Benefit5", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"id", "Name"}, "Attribute", "Value")
in
#"Unpivoted Other Columns"
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
Thanks for pointing me in the right direction
I tried to unpivot the actual tables but receive this error when applying th echanges: