Forum Discussion
Line and Clustered Column Chart - Points above Bars
Hi,
I've created a Line and Clustered Column Chart as shown here. The data is held on our IBM AS/400 as I am doing a Direct Query in PowerBI to get this data:
The bars are a count of Orders within that transaction status at the current moment in time and only shows data for today.
The points are the total value of the Orders within that transaction status and only shows data for today.
My Axes are setup like so:
My question is, how do I get the points to display on top of each respective bar and then have a Line that's running from one point to another. For example:
I'd like the point with the value of 5.0K to show above the bar that shows 25.
I'd like the point with the value of 10.9K to show above the bar that shows 193 - Which it currently does.
I'd like the point with the value of 6.7K to show above the bar that shows 105.
Is this possible as I can't seem to figure it out?
Thanks for any help.
4 Replies
- AnonymousNot applicable
Hi AhmedT001 ,
I understand your needs, but you need to do some transformations on the data.
(1)Click on “transform data” to enter the Power Query, right-click on the table, duplicate a table.
(2) Select columns KTATSTS, DTATSTS, and CTATSTS, and click the unpivot columns.
(3) Then click “Close and Apply” to return to PBI Desktop and create a measure.
Measure = COUNTROWS(FILTER(ALLSELECTED('Table (2)'),[TADOCD]=MAX('Table (2)'[TADOCD]) && [Attribute]=MAX('Table (2)'[Attribute])))(4) Place the field as shown below, it is different from your original x-axis, but if you place the TADOCD column on your x-axis then the numbers will be displayed in the middle bar and not spread out, this is due to the design.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AhmedT001Frequent Visitor
Hello,
Thank you for the very detailed response.
One problem is the Transaction Statuses are all held on one file. So we have a Transaction Header file and that holds everything irrespective of status. In order for me to create KTATSTS, CTATSTS and DTATSTS, I've duplicated the Transaction file 3 times, then filtered to only show K, C or D respectively on each file and then the count is done on the visual. I tried lots of different ways to get the count to work and this seemed to be the only way I could get it to work, unless there is another way you know of?
I'm not sure how I can get your method to work - which looks exactly what I need it to do, so thank you very very much for that, have my Kudos :).
Hope this makes sense?
- AnonymousNot applicable
Hi AhmedT001 ,
You do not need to copy three tables. All you need to do is convert the data to have a date column, a status column (which includes three statuses), and a value column. This is shown in the following figure:
You can convert directly in the original table. The reason I mentioned duplicating the tables is because I didn't want to affect the structure of your original tables, so I duplicated one table.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.