Forum Discussion
Clustered column chart for machine input and output..
- Anonymous2 years ago
Hi Jaehir ,
Thanks for the reply from johnbasha33 .
See which one you like?
Or:
The first visual object requires the creation of a calculated column:
Machine = SWITCH( TRUE(), CONTAINSSTRING([Attribute], "Machine 1"), "Machine 1", CONTAINSSTRING([Attribute], "Machine 2"), "Machine 2", CONTAINSSTRING([Attribute], "Machine 3"), "Machine 3", "Unknown" )Then:
The second visual object needs to be like this:
The pbix file is attached.
If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi Jaehir, you might be interested in learning more on "Unpivot" functionality, which will help you to obtain 2 columns: one with machine number and the second one with corresponding values. Then you can use "Machine Type" as a legend.
You can find learn more about "Unpivot" here.
Have a great day!
- Thanks for the respond. I have a question, how about the Date with different time correspond to each machine operating that day? Since if i unpivot the columns, wouldnt the Date need to be effected as well? Also for legend, instead of machine type, i need it to be IN and OUT, for example, one bar represent IN (color light blue) and one bar respresent OUT (color dark blue). This has been bugging me while trying to create the graph itself.
- Sergii242 years ago
Super User
From what I see at your screenshot the date should be okay: you already have all dates in the same column. When unpivoting columns, for unselected columns values will repeat, so if you 1 row with a single date for 3 machines and their values, the unpivoted version will have 3 rows (by number of machines), where the same date will be repeated.
What I suggested (unpivot machines) is just an example. Play around with unpivoting to obtain the desired result. Remember that to use any value in a legend they all should be within the same single column.- Jaehir2 years agoFrequent Visitor
Understood tomorrow I'll try recreating the graph. I'll be updating my progress. Thanks for the assist.
- Jaehir2 years agoFrequent Visitor
Hi so far ive tried using unpivot and it works well. The date followed through correctly for each IN and OUT. But i have an issue, when i unpivot the second sets of column, Machine 2 (IN),..Machine 2 (OUT), the table becomes a lot messier with too much duplication. I tried research online but whatever i tried like creating copied queries and merged queries, or unpivot both sets of column and then split column with delimeter, doesnt seems to succeed.