sorting
11 TopicsSorting/filter data by particular month in line chart
Hello all, I have a query about sorting data in a particular month in line chart. Line chart is showing a series of data, example as below. At the moment, my top 5 item groups are sorted by total value of item groups. What if at each month, I need to sort the data in descending order for that particular month, how do I do it in filter or DAX? It’s easy in excel by just sorting a particular column, but I don’t know how to do it in Power BI. As I’m sorting item group orders at each month, which means my top 5 item groups will be different as at each month.576Views0likes1CommentNeed help in DAX in Line Chart
Experts, please help me on DAX column for sorting the current year & previous year. The scenario is, we have one date column which holds the data for last 365 days and we have a requirement to show 2 lines on the Y-Axix i.e. one is for current year & previous year for comparing both year values. But, unfortunatley when we see on the current date it it is broken the line for previous year. please help?2.8KViews0likes16CommentsDynamic table sorting based on total count with fixed value at the bottom
Hi, I want to sort this table dynamically. So that the color category with the highest count is at the top, and the lowest at the bottom, but, I want "Unknown", to always be the last value in the table even though it has a high count. How do I do this? Thanks in advance, highly appreciate it 🙂Solved2.2KViews0likes6CommentsDynamic Sorting stacked bar chart based on slicer value
I have one slicer and 3 Stacked bar charts and this bar chart contains only X-axis and legends. In my slicer, I have values like 1,2,3,4 when I select 1 or 2, or 3 my stacked bar chart should sort according to alphabetic order but instead of these three when I select 4 My stacked bar chart has to be sorted based on legend value, not the alphabet. Thank you in advance for whatever effort you are giving into this problem.3.2KViews0likes5CommentsSorting a range of number and letters
Good morning everyone, I am looking for a way to divide inventory locations into zones. Our inventory locations start with row 0, shelf A, bin 1, example 0A1. each shelf has 5 bins, the shelfs go from A to J and we have 70 rows. 0A5 0B5 0A4 0B4 0A3 0B3 and so on until shelf J 0A2 0B2 0A1 0B1 Then 1A5 1B5 1A4 1B4 1A3 1B3 and so on until shelf J 1A2 1B2 1A1 1B1 When I sort by location, the result is row 0 first then I get all the 10s, 11s and so on until I get row 1, then all the 20s before I get to row 2. I am looking for a way to create inventory zones where... Zone 1 are rows everything in between 0A1 to 6J5 Zone 2 are rows everything in between 7A1 to 11J5 Zone 3 are rows everything in between 12A1 to 15J5 and so on. Will this be possible?Solved2.1KViews0likes8CommentsHow to sort TopN results based on a column not used in the function
Hello Power BI Community, Happy New Year to all! I am trying to get a solution for a peculiar request. I am populating a measure in matrix to get a skyline chart. My DAX measure is as follows: Skyline_Names = var Rank = SELECTEDVALUE( Skyline[Rows] ) var Count = DISTINCTCOUNT( Table1[Name] ) var stage = SELECTEDVALUE(Table1[Stages]) RETURN IF ( NOT ISBLANK ( Rank ), IF ( Rank <= Count, LASTNONBLANK ( TOPN ( Rank, VALUES(Table1[Name]),Table1[Name],ASC) ,0 ) ), stage ) Now, this is all fine and the values in matrix are sorted based on the alphabetical order of the Table1[Name], but I need to sort based on a different column. I highlighted the part where I need to sort based on a different column eg: Table1[Price]. I tried multiple functions like SELECTCOLUMN, RANKX, etc.. but did not succeed. I am including the source and PBIX file https://drive.google.com/drive/folders/1VdxQRTty-kxuHvurB8o-2cJkFhgcw2El?usp=sharing I really appreciate if you have any suggestions or can help me with this. Thank you in advance! Anonymous amitchandak Greg_Deckler ValtteriN2.7KViews0likes4Comments[DAX] How to apply a multiplier on a Parameter based on a Date and another parameter
Hello all, First post for me here on a problem I have for a few days. I am working on a dashboard displaying sales data for a bunch of shops. To be properly interpreted, the sales numbers has to be adjusted by a multiplier. This multiplier is different for every shop and is changing through time. The multiplier values are stored in a "Multiplier" table : ShopID Date Multiplier 1 01.01.2018 1 1 01.01.2020 1.2 2 01.01.2018 1.1 3 02.03.2019 1.05 On the other end, the sales values are stored in another "Sales"table : ShopID Date SalesNb 1 01.01.2018 545 2 01.01.2018 362 3 01.01.2018 421 1 02.01.2018 532 2 02.01.2018 350 (...) (...) (...) I also have a "DateTable" where I store all the date input of my data model and a "Shop" Table. Regarding the relationships : "DateTable" 1 ---->-----* "Sales" "Shop" 1 ---->---- * "Sales" "Shop" 1 ---->-----* "Multiplier" "DateTable" 1 ---->---- * "Multiplier" My goal is to have a measure that return for a given asset and for a given date, the multiplier that should be apply to the Sales number. This measure will then be used in a SWITCH measure to allow the user to pick if they want the adjusted number or not. Good luck and tell me if you want more information !Solved1.2KViews0likes2CommentsSort Date and Value columns
Hello, I have a data that looks like below: I would like sort the DEP, DEC and DOM column in descendig order for whatever the date range EST (Datetime )Column is selected. Example if I select date 1/1/2020 and 1/2/2020 for both the dates it should arange the DEP DEC and DOM values form Highest to lowest. 1/1/2020 high to low and 2/2/2020 high to low, 1/3/2020 high to low. In current scenario If i try to order them in descending order it mixes the dates and hours by decending the values considering the full range of all dates. I would like to see High to low for each date selection. Please suggest me the DAX or any solution based on the column names I have. Thank you.2.2KViews0likes5CommentsDAX Measure Sort by issue
I have a card on a report page that displays selected choices from slicers and I am having an issue obtaining the correct sort order for one of them. The measure is based on a simple table of two columns, 'Grade' (text) and 'Order' (whole number). Grade Order Teachers 1 2 P4 3 P5 4 K 5 1 6 2 7 3 8 4 9 5 10 6 11 7 12 8 13 9 14 10 15 11 16 12 17 My DAX Measure statement is: List of Grade Values: = VAR __DISTINCT_VALUES_COUNT = DISTINCTCOUNT('Grade_Sort_Order'[Grade]) VAR __MAX_VALUES_TO_SHOW = 17 RETURN IF( __DISTINCT_VALUES_COUNT <> __MAX_VALUES_TO_SHOW, CONCATENATE( CONCATENATEX( TOPN( __MAX_VALUES_TO_SHOW, VALUES('Grade_Sort_Order'[Grade]), 'Grade_Sort_Order'[Grade], ASC ), 'Grade_Sort_Order'[Grade], ", ", 'Grade_Sort_Order'[Grade], ASC ), "" ), "All" ) As you can see, the CONCAT statement is set to order by 'Grade_Sort_Order'[Grade], whereas I need it to sort by 'Grade_Sort_Order'[Order] but the statement does not recognize the 'Order' column in the table. If I change it from Grade to Order I get the following error: "A single value for column 'Order' in table 'Grade_Sort_Order' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result." So using the order by of Grade, the order results of a selection of P4, 1, 4, 10 is: 1, 10, 4, P4 when what I need is P4, 1, 4, 10. I have tried changing the column format to text and using 01, 02, 03, ect. but this did not work. I have probably over explained this but I feel it is best to be wordy rather than vague. Any thoughts are much appreciated. DanSolved6.5KViews0likes4Comments