"dax" "need help"
5 TopicsSort Column in based on the Row total values in Matrix visual
Hi Team, Please help me with the below usecase. In the attached Power BI Matrix image, the column headers are not fixed categories there can be more new ones in future ( so I want the column headers to be sort by desc based on the Total row value ). As the date is filtered on the page the position of the columns will change as per the Total % (heighest to the left & lowest to the right). Measure used : CTR= Divide(Clicks, Impressions,0) Output: CB | TQ | QW | AS | ER | AS | YW Thanks in advance, SknSolved881Views0likes7CommentsCalculate days spent in the same status - date in same column
Hi, First of all, I'd like to apologise, I'm very new to PowerBi, I've tried to look at previous similar posts and their solution, but couldn't make them work for my case. We are trying to get more insights into our sales process. We have different stages (we call them status) for our sales opportunities. The statuses are 1. Preparation, 2. Discussion with Prospect, 3. Submitted, 4. Accepted, 5. Completed, 6. Declined, 7. Did not proceed. Firstly, we want to understand how long (how many days) the opportunities stay in each status. Then, we want to identify those opportunities that have been in the current status for more than 180 days. For the first request (days in each status) i'm trying to create a calculated column, but until now I haven't been able to reach the results I want. This is a sample of what i have (table name is opportunity_ status) opportunity_id start_date status 13 11/03/2026 5. Completed 13 07/01/2026 4. Accepted 13 27/06/2025 3. Submitted 13 05/03/2025 2. Discussion with Prospect 13 05/11/2024 24 22/08/2025 6. Declined 24 04/12/2024 2. Discussion with Prospect 24 29/07/2024 7. Did not proceed 24 14/07/2024 2. Discussion with Prospect 24 16/03/2024 7. Did not proceed 24 16/03/2024 2. Discussion with Prospect 24 14/03/2024 51 17/08/2025 7. Did not proceed 51 01/08/2025 79 27/01/2026 6. Declined 79 14/01/2026 2. Discussion with Prospect 103 11/02/2026 3. Submitted 103 10/02/2026 2. Discussion with Prospect 103 08/02/2026 1. Preparation and this is the result I'd like to have opportunity_id start_date status days_in_status 13 11/03/2026 5. Completed 5 13 07/01/2026 4. Accepted 63 13 27/06/2025 3. Submitted 194 13 05/03/2025 2. Discussion with Prospect 114 13 05/11/2024 120 24 22/08/2025 6. Declined 206 24 04/12/2024 2. Discussion with Prospect 261 24 29/07/2024 7. Did not proceed 128 24 14/07/2024 2. Discussion with Prospect 15 24 16/03/2024 7. Did not proceed 120 24 16/03/2024 2. Discussion with Prospect 0 24 14/03/2024 2 51 17/08/2025 7. Did not proceed 211 51 01/08/2025 16 79 27/01/2026 6. Declined 48 79 14/01/2026 2. Discussion with Prospect 13 103 11/02/2026 3. Submitted 33 103 10/02/2026 2. Discussion with Prospect 1 103 08/02/2026 1. Preparation 2 so, for the latest status the calculation should be days since start_date to today. and for the rest, days since start_date to start_date of next status. Does it makes sense? Can somebody please help me with DAX for a calculated column like that? Then, I think I'd also need another measure, I was thinking maybe a true/false? something like overdue_in_ status, that is true is value in Days_in_status > 180 for the latest status, if latest status is Preparation, Discussion with Prospect, Submitted or Accepted. Or is there a better way to identify opportunities that have been in the current status for longer that 180 days? Thank you so muchSolved3.3KViews0likes10CommentsUnproductive customer
Hi All, In my Power BI report, we have only demention columns (e.g Customer name , code and location) and las invoice date(taken max invoice date from sales fact table). in this report we want to show only unproductive customer, means they has not made any sales in the selected date range. Example: (if we select date range in the slicer, 1s Sept to 30th sept) Customer 001 status is delivered then they are productive customer and customer status is cancelled, returned the they're unproductive customer. want to show only unproductive customer. Tried creating DAX but it's not working. Can anyone please help?Solved1.2KViews3likes6CommentsQuestion on AVERAGEX
I have been using this DAX for long time, and now I would like to analyze it. I have uploaded my PBIX file here. Here is my DAX: Averagex = AVERAGEX( FILTER ( SUMMARIZE( 'Table', 'Date'[DateFormat], "ClientID_M", [ClientID_M] ), [ClientID_M] > 0 ), [ClientID_M] ) According to the syntax of AVERAGEX, it is: AVERAGEX(<table>,<expression>) Update on 9/12/2025: Question: I am trying to see where <expression> is on this code.Solved1.2KViews0likes7CommentsCount days of a contract in a period
Hello, Hope someone knows the answer... My formula to conunt the numer of days in a year a contract is active don't work. I use the following formule: _TotalDays of a contract in period = VAR StartPeriode = MIN(Datumtabel[Date]) VAR EindPeriode = MAX(Datumtabel[Date]) RETURN SUMX( FILTER( F_Contracten, -- Alleen toewijzingen die overlappen met de periode NOT(ISBLANK(related(D_contracten[Ingangsdatum]))) && NOT(ISBLANK(related(D_contracten[einddatum]))) && related(D_contracten[Ingangsdatum]) <= EindPeriode && RELATED(D_contracten[einddatum]) >= StartPeriode ), DATEDIFF( MAX(RELATED(D_contracten[Ingangsdatum]), StartPeriode), MIN(related(D_contracten[einddatum]), EindPeriode), DAY ) + 1 with this as result: This is not what i want to see i want in each year the contract is active see the the days belong to dat year: for example: key1: in 2022: 1-8-2022 - 31-12-2022: 153 days in 2023: 1-1-2023 - 31-12-2023: 365 days in 2024: 1-1-2024 - 1-10-2024: 274 days Thanks a lot for reaction!Solved1.1KViews0likes6Comments