stacked bar chart
5 TopicsStacked Bar chart: Group legend values
Hi folks, I have a stacked bar chart with products as a legend. There are a lot of products in my data. Therefore does not show all and gives this hint Personally i think this is crazy because the user will not even read this and see a wrong revenue: But ok, it is what it is. I tried to create a RANKX measure an show only the biggest legend values and group everything else as "Other" But Power BI will not let me put a measure in the legend... Any ideas?Solved1.6KViews0likes3CommentsDynamic Top N Parameter doesn't work when adding a LEGEND to a Stacked Bar Chart
Link to pbix: Dynamic TopN with Legend not working.pbix In my sample, I have a horizontal stacked bar chart (Sales by City) that interacts correctly with the dynamic Top N parameter: I used the following rank measure: Rank_City = RANKX( ALLSELECTED('Dim_City'[City]), [Sales Amount], , DESC, DENSE ) And a measure applied to the chart as a filter to activate the dynamic Top N: TopNCity = IF([Rank_City] <= 'TopN'[TopN Value], 1, 0) All is well until adding a sub-category as a legend breaks the dynamic top N: How do I make sure the chart still displays the correct number of cities even with a sub-category applied as a legend? I have attached a link to the sample pbix. Thank you!778Views0likes2CommentsBar Chart using only data entrys with highes Value
I have a small data set ("Sheet1") that contains transactions. A transaction is definied by a customer who buys something - however it is not important who sold the product. The seller column is called "used in company". Each transactions has a Transcation ID ("Tx-ID") and is associated with a Quantity of sold products ("Quantity"), a special profitability measure ("affordability") and a basic CM1 value ("CM1"). Customer and product info is not included. Now, since transactions can have different sellers (or "used in companies") - some transactions occur multiple times in the data set. These double transactions differ only in the affordability and CM1. When working with the data, only those transactions with the highest affordability should be considered. However, this should be done with regards to one or multiple used in companies that the user has selected. As an example, we have the following line items: Affordability used in company Tx-ID Quantity CM1 month 230 New York 1 300 1000 January 10 Berlin 1 300 200 January 20 Berlin 2 400 2000 January For used in company = New York & Berlin, CM1=3000 and Quantity = 700. For used in company = Berlin, CM1 = 2200 and Quantity = 700 Now what I want to do is create a stacked bar chart, with: - Y-Axis: CM1 - X-Axis: month & Tx-ID (to show a consolidated picture while still allowing for a drill down) - Legend: Used in company So sticking to the example from above: On the consolidated monthly view, having all companies selected, the chart should display CM1 of 3000 (since only the CM1 associated with the higest affordability per Tx-ID is considered) with a 2000:1000 split. When jumping to the Tx-ID level, I want to see two Transactions, where Tx-ID 1 belongs to New York and Tx-ID 2 belongs to Berlin. This chart should also be adaptive to a "used in company"-slicer: Thus, used in company = Berlin, Tx-ID 1 as well as Tx-ID 2 should be associated with Berlin (since now for both transactions Berlin has the highest affordability) and on a consolidated view, the CM1 should be 2200. How can I achieve that? Thanks a lot for some wise advice!Solved658Views0likes3CommentsUnable to Sync y axis scale of two stacked bar charts
Hi Guys, I am trying sync the scale for two visual which are prepared from two different dataset but with the same structure. So in the tab "without scale applied", the two stacked bar charts are presented. I want to sync their scale. In the current selection, chart 1 has the maximum y axis value as "3K". and the char 2 has maximum y axis value as "1K". i want to create a measure that returns 3K as so that i apply this value in their scale to make it consistent. the measure i want to create needs to be dynamic and update based on the selection of "Location To" Filter of the slicer. I had created on with the name of "Scale" but that does not seem to be resolving the issue Scale measure = Var _Table1 = CALCULATETABLE(SUMMARIZE('Table 1','Table 1'[Year],'Table 1'[Location To],"@Amt",[Total Amount 1])) Var _Table2 = CALCULATETABLE(SUMMARIZE('Table 2','Table 2'[Year],'Table 2'[Location To],"@Amt",[Total Amount 2])) Var _MAXVal_1 = MAXX(_Table1,[@Amt]) Var _MAXVal_2 = MAXX(_Table2,[@Amt]) Var _FinalMax = SWITCH(TRUE(), _MAXVal_1>_MAXVal_2,_MAXVal_1,_MAXVal_2) REturn _FinalMax the main challenge appears to be negative and i am struggling to eliminate them from my calculation. Could you guys please help me on this? I had been trying to attach the PBIX file but didn't get the option. Please suggestSolved577Views0likes1CommentStacked bar chart not aggregating correctly.
Hello, good morning everyone! I'm completely stuck on a problem displaying data correctly on a stacked bar chart. My stacked bar chart follows the drill process of Exam > > Sub Exam > > User scores. The user scores and sub-exam scores all seem to be fine but the main exam scores only seem to show the users max score from the sub exams, rather than aggregating if that makes sense? The images below should sort of give an idea of everything Main Exams Sub Exams User Scores for Sub Exams The Sub Exam image is a reflection of the very top bar (63) but as you can see, it doesn't quite add up correctly. The measures I've created are to check scores from 0-100% and follow a similar formula of - 10% = (CALCULATE(DISTINCTCOUNT(jobs[EmailID] ), Filter(jobs,jobs[ActivityTotalNew] >= 0.1 ) ) - [100%] - [90%] - [80%] - [70%] - [60%] - [50%] - [40%] - [30%] - [20%] ) or 70% = (CALCULATE(DISTINCTCOUNT(jobs[EmailID] ), Filter(jobs,jobs[ActivityTotalNew] >= 0.7 ) ) - [100%] - [90%] - [80%]) etc, upto 100% And the measure I've used to add up the totals of the exams is ActivityTotalNew which is - ActivityTotalNew = (jobs[Exam1%]) + (jobs[Exam2%]) + (jobs[Exam3%]) + (jobs[Exam4%]) + (jobs[Exam5%]) The scores are all decimal and should add upto a score of 1 for 100% but it's just not quite working out somewhere and I'm completely at a little bit of a dead end 😔 If anyone had any ideas or pointers of how to get it all working correctly, I'll be more than grateful, I'm just completely stuck on trying to find a solution. I think it's due to the data not aggregating correctly but I'm not sure on how to fix it all. Thank you in advance for any help and if anyone has ay questions or needs more information, feel free to let me know and I'll try as much as I can to help! Thank you! 🙂573Views0likes1Comment