legend
18 TopicsProduct name for a legend and table
I am working on a report for product association and a basket analysis - most commonly, products are purchased with each other. The idea is for the client to pick a product in the slicer and see a view of a table and a graph (so far). I will start with the table so you can visualize what I have: Picked Product ID Picked Product Name Associated Product ID Associated Product Name Associated Product Total Sales Associated Product Quantity 1 Coke 2 ? 40,00 5 1 Coke 3 ? 30,00 6 1 Coke 4 ? 30,00 8 So the issue is: I need to add the product name to the table. But of course, I already used that column, which returns the product name associated with the product picked in the slicer, which is currently being analyzed. I have a similar issue with the bar graph showing the total sales of the products by each associated item the legend shows the product ID and not the name. How can I have the name of the associated product displayed as well? Has anyone managed to solve something like this before? Thank you for your time!!Dynamic 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!778Views0likes2Commentssorting legend based on two criteria
I have a simple dataset that contains each supplier's sale in each year. I made a bar chart with years in the x axis and suppliers' sale on the y axis and used supplier company as legend. I want to sort the legend (suppliers) in each bar (year) based on the total sales of that supplier in that specific year. I can sort them by all-time total sales of suppliers, but I dont know how to do this sorting in each year.1.2KViews0likes6CommentsDynamic Ranking for legend.
Hello all, So I have been working on a powerbi project and I am new to this so just exploring. I have orders table, customers table,date table along with few other tables and I have created measures for metrics like Order count, Order quantity, LIFR%,VOFR%,OTIF%, etc. What I want to do is, plot a linechart of every metric with time (from date table) but only top N customers. So I have done this till now. Basically I created a table with metrics name and then Selected_Metric_Value will return the metric value when i select it in slicer. I have tried using RANKX but the lineplot does not show the legend of customer names properly. For eg : If I select LIFR% on the slicer, I want the linechart to have top N customers lines vs timeframe. Then if I select Order count then I want the plot to dynamically change the data and legend both. MetricsTable = DATATABLE( "Metric", STRING, { {"Order Count"}, {"Order Lines Count"}, {"Order Quantity"}, {"LIFR%"}, {"VOFR%"}, {"OTIF%"} } ) Selected_Metric_Value = SWITCH( TRUE(), SELECTEDVALUE(MetricsTable[Metric]) == "Order Count", [Total_orders], SELECTEDVALUE(MetricsTable[Metric]) == "Order Lines Count", [Total_order_lines], SELECTEDVALUE(MetricsTable[Metric]) == "Order Quantity", [Total_order_quantity], SELECTEDVALUE(MetricsTable[Metric]) == "LIFR%", [LIFR%], SELECTEDVALUE(MetricsTable[Metric]) == "VOFR", [VOFR%], SELECTEDVALUE(MetricsTable[Metric]) == "OTIF%", [OTIF%], BLANK() )1.8KViews0likes5CommentsCumulative Total data points with no data (0s) display as the maximum issue
I am trying to develop a Ticket Sales cumulative line graph sectioned out by how many weeks before the event the tickets were bought. I used the following DAX command to get the cumulative total. And here is the graph that results from this measure. The issue that appears is the data points of 0 display as the maximum, or what is known as the final total at 0 Weeks Out from the event. What is even more confusing is that the cumulative total measure recognizes those data points as 0s because let's say the final total is 100; those 0s show up as 100 but the measure does not count them because it knows they are 0s. This problem is even more apparent when I insert a legend. All of these spikes are weeks where no tickets were sold, and instead of maintaining the past week's total, they spike to the maximum (final total) and are not included in the measure's calculation. I have also considered excluding these data points that spike, since they would be 0 anyway, but there are over 1500 that would need to be excluded and after 50, PowerBI gives me an error. Is there anything I can include in my DAX command to make these "spikes" smooth out and carry over the past week's total?Solved1.6KViews0likes3CommentsHow to create a dynamic legend for matrix based on quarter selected
Hi I have a matrix visual that has % of Approved Request by Divison by Quarter. How can i make the quarter Dynamic? where it will show the current and previous 3 quarters based on the quarter that I have selected. I already have the measures for Current Quarter, and 3 quarters prior, but i am unable to make it dynamic.Creating Customized Legend and Tooltip for Clustered Column Chart
Hi everyone! I hope you can help me with a visualization challenge I'm facing. I have created a clustered column chart to display year-on-year (YoY) inflation based on different cities. The chart shows two columns for each city: one for the current quarter and year's YoY inflation and the other for the YoY inflation from the previous quarter. I have also filtered the data based on selected quarters and years. Now, my question is: How can I customize the legend and the tooltip to dynamically adjust based on the selected filter values? For instance, if I select "Quarter I" and "2019" from the filters, I want the legend to show "QI 2019" for the current quarter and "QIV 2018" for the previous quarter. Similarly, I want the tooltip to display the respective inflation values for the selected quarters. Is there a way to achieve this in Power BI? I would greatly appreciate any insights or solutions you can provide. Here I attached an illustration of my current chart for reference. Thank you in advance for your help! ❤️New DAX Measure - return a (unique) value on a field from a selection from another field
Hello All, STORE ITEMS SOLD A Electronics, Sporting Goods B Sporting Goods C Electronics, Sporting Goods, Apparel Would like to create a new measure for the unique items: Category Apparel Electronics Sporting Goods Where selecting the Category value will return the Store(s) that sell the item(s). For example --- Selecting Apparel returns Store C Selecting Electronics returns Store A and Store C Selecting Sporting Goods returns Store A, Store B, and Store C I'm new to creating DAX measures. Any help will be greatly appreciated. Have a great day and weekend.Solved917Views0likes4CommentsIn Power bi Gantt 2.2.3 , percent completion value becomes 100% after adding legends
Hi , i am using gantt 2.2.3 visualisation to show progress of projects. I want to show legend colour based on project status , but when i am adding the field in legend the % completion is changing to 100% which is incorrect. 45 % is the correct progress. After adding the legend it is changing to 100%.Create Categories Based On Count From a Measure
Hey all! I'd like to preface by saying that I am mostly new to Power BI, not a programmer, and I am self-taught, so if this question seems obvious or is a standard practice, please forgive my ignorance. I am trying to determine the best way to grab a count of a field and then break that count into categories. My goal is to take a count of issues (they have a unique key) in a changelog, filtered by the same unique key in the main table. Depending on the result, I want catergorize it into buckets i.e. 1-3, 4-6, 6-9, etc. I want to use these as a legend for a pie chart, and then get a count of issues that fit into each category. This is a rudimentary example: Main Table - high level list of issues and associated fields Issue # Description Creation Date Status 1 Bug 1/1/2022 Closed 2 Bug 1/2/2022 Closed 3 Change Request 1/3/2022 Open 4 Bug 1/4/2022 Closed 5 Enhancement 1/5/2022 Closed 6 Bug 1/6/2022 Open 7 Bug 1/7/2022 Closed 8 Change Request 1/8/2022 Closed 9 Bug 1/9/2022 Open 10 Enhancement 1/10/2022 Closed Changelog: Issue # Change Type Change Date 1 Status Change 1/2/2022 1 Comment 1/3/2022 1 Status Change 1/4/2022 1 Comment 1/6/2022 2 Status Change 1/5/2022 2 Comment 1/6/2022 2 Status Change 1/7/2022 2 Comment 1/8/2022 2 Status Change 1/9/2022 3 Comment 1/10/2022 3 Status Change 1/2/2022 4 Comment 1/3/2022 4 Status Change 1/4/2022 4 Comment 1/6/2022 5 Status Change 1/5/2022 6 Comment 1/6/2022 6 Status Change 1/7/2022 6 Comment 1/8/2022 6 Status Change 1/9/2022 6 Comment 1/10/2022 6 Status Change 1/2/2022 7 Comment 1/3/2022 7 Status Change 1/4/2022 7 Comment 1/6/2022 7 Status Change 1/5/2022 8 Comment 1/6/2022 9 Status Change 1/7/2022 9 Comment 1/8/2022 9 Status Change 1/9/2022 9 Comment 1/4/2022 10 Status Change 1/6/2022 10 Comment 1/5/2022 Count Result: Issue # Changes 1 4 2 5 3 2 4 3 5 1 6 6 7 4 8 1 9 4 10 2 I am able to get the count data easily without a measure, but I cannot bucket it into groups. Any quick thoughts on how to accomplish this? I am assuming this will require using variables, but I haven't the slightest idea where to start. Thank you!Solved4.4KViews0likes5Comments