Forum Discussion
Custom Y Axis Labels
- 9 years ago
Hi pzeller,
We can perform the pivot in DAX if you like.
If you create a calculated column like this
Table 2 = UNION( SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task1" , "Value" ,[Task 1]), SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task2" , "Value" ,[Task 2]), SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task2" , "Value" ,[Task 3]) )
Hi pzeller,
I recommend you pivit your table to the following structure
PersonID , TaskID , Value -----------------------------------
PersonA , Task 1 , 1
PersonA , Task 2 , 2
PersonA , Task 3 , 3 ,
PersonA , Task 4 , 6
PersonB , Task 1 , 3
etc
Then you will find it much easier to create your measures. You can pivot your data in the Query Editor if that helps
Thanks for the reply Phil_Seamark, but when I try to put in place what you mentioned I get an error stating "This query contains transformations that cannot be used for a live connection.". It seems that when working with LIVE data (Direct Query) Power BI's functionality is really hamstrung. Now knowing this, can you see another way to accompolish this task?
EDIT:
I attempted what you suggested using "Import" and that worked great, but unfortunately we are required to use "Direct Query".
- Phil_Seamark9 years agoMicrosoft Employee
Hi pzeller,
We can perform the pivot in DAX if you like.
If you create a calculated column like this
Table 2 = UNION( SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task1" , "Value" ,[Task 1]), SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task2" , "Value" ,[Task 2]), SELECTCOLUMNS('Person',"Person",[Person ID],"Task Name" , "Task2" , "Value" ,[Task 3]) )- pzeller9 years agoFrequent Visitor
Thanks Phil_Seamark! With this we were able to figure out how to do it and achieve the desired look.