Forum Discussion
Changing visual to a single object
Hi guys,
I have a situation but having difficulty what the actual problem is, so I used a generic title hoping it would be accurate.
I have tables as follow(Car.CarId references to CarDetails.Car as a one to many relation):
I used a line and stacked column to create this(The bars is just a measure to see if it's increasing speed or not.):
But as I added a second or more cars to my database and refresh the data in Power BI. The visual gets overlapped like below:
How can I add a list of cars, so I can select carId 1 or 2 and only show the visual based on data of carId 1 or 2?
Thanks a lot in advance ! 🙂
Update:
I also used a slicer in this case. It works for the other visuals but not for this visual in particular.
The reason is because in the line and stacked column visual I'm using a custom measure called accelerating(to populate the stacks) on the legend. If I use carId on the legend, then the slicer works as it has a connection it. The problem is I can't use both..
11 Replies
- lbendlinSuper User
there may be better ways to visualize this - maybe with a line chart with different colors for car and acceleration.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- AnonymousNot applicable
Thanks for your reply.
The reason I chose line and stacked visual is to have a background color to indicate whether a car is accelerating or decelerating. I use that measure on the stacks.
I also used a slicer in this case. It works for the other visuals but not for this visual in particular.
The reason is because in the line and stacked column visual I'm using a custom measure called accelerating(to populate the stacks) on the legend. If I use carId on the legend, then the slicer works as it has a connection it. The problem is I can't use both..
- AnonymousNot applicable
Hi Anonymous ,
Not very clear about this——I'm using a custom measure called accelerating(to populate the stacks) on the legend. Because to my knowledge, measures could not be applied to Legend field.
Could you please share me with your pbix file after removing sensitive data to help us clarify your scenario?
Refer to:
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Eyelyn Qin- AnonymousNot applicable
Thanks for your reply!
I've added the .pbix file link:
https://drive.google.com/file/d/18T5pjmOg0GnZJIw1-JTRudmVQEBthvXC/view?usp=sharing
As you can see currently, there is no visualization because the x axis scale is way off from GameTime's values. If you remove TrainId from Legend column in the visual, it shows overlapping data from multiple Trains. Using the slicer, I want it to show data of only 1 train. This way, there would be no overlapping data since this visual is meant to show only 1 object at a time.
Hopefully I was able to explain my problem.
- lbendlinSuper User
Thank you for providing the sample data. That helps a lot with proposing a potential solution.
Your problem is that you have blank TrainStateIDs in the LogItems table. Please explain/correct.
There is another problem - a bug in the Small Multiples view - it does not properly show x axis if the value is time only (without a date). Converting the time to decimal works.
- lbendlinSuper User
- I submitted the time x axis bug for the small multiples, and it was accepted.
- you cannot combine secondary Y axis, small multiples and legends (as far as I know). Pick two out of three.
See attached my current version.
- AnonymousNot applicable
I changed your second page to include a slicer. It works!
However, how can I use the x axis GameTime as time and not decimal?
https://drive.google.com/file/d/12vG4bVyY1rDV4Z1_worzTuVgREKnK855/view?usp=sharing
- lbendlinSuper User
wait for the bug to be fixed. icm 311714069 .