Forum Discussion
ggargan
3 years agoFrequent Visitor
Creating a table and populating one column with measures
Hi All.
I want to create a table with two columns inside PowerBI and use existing data inside power BI to populate it.
I need a table containing two columns - Body Part & Total Value - to use this with the synoptic tool.
The trouble i'm having, my data is not structured this way.
For each body part I have a separate measure to calculate it - e.g.
Wrist = calculate(sum('Metrics'[Value]), 'Metrics'[Position ID]=234)
Arm = calculate(sum('Metrics'[Value]), 'Metrics'[Position ID]=235)
And so on...
So the data is not in a table, but I need it to be in a table so I can use it with the synoptic editor in order to have a heat map of a body image.
I hope this makes sense, but how would I go about getting these calculated measures into a table?
Many thanks
Gerard
1 Reply
- TaylorPBI21
Resolver I
Hi ggargan,
Could use this SWITCH function logic to assign all body parts thier ID and amend to your needs in a new calculated column, I've done some example data to show the results...😎
Body Part = SWITCH( TRUE(), 'Table'[Postition ID] = 1,"Wrist", 'Table'[Postition ID] = 2,"Arm", 'Table'[Postition ID] = 3,"Neck", 'Table'[Postition ID] = 4,"Leg", "No body part" //If no ID had no body part assigned then return No body part )Many Thanks,
Taylor
LinkedIn: www.linkedin.com/in/taylordownes10 😊