'need help' 'dax'
38 TopicsPolynomial Regression Trendline
Hi all, Is it possible to generate a polynomial regression trendline of degree two in Power BI similar to Excel using the LINEST function? I'm expecting two slope values and a coefficient as a result to calculate the trendline equation (y = slope1 * x^2 + slope2 * x + coefficient). Thanks in Advance,3.3KViews0likes3Commentsneed help for dax
I have a table with columns: Date, Market, and Potential_dem_Cost. I need to create two measures: Next Month Potential_dem_Cost Next-to-Next Month Potential_dem_Cost These measures should dynamically calculate the Potential_dem_Cost for the next month and the month after that, based on the currently selected month in the filter. For example, if I filter January, the measure should return: Next Month = February’s Potential_dem_Cost Next-to-Next Month = March’s Potential_dem_Cost.Solved1.3KViews0likes6CommentsHi Team pls help this dax measure (day at port)
I have two tables: the first contains the columns Market, Max ETA Date, and Predicted Delivery Date; the second contains Capacity and Market. I need to calculate the difference between Max ETA Date and Predicted Delivery Date for each market. If the difference exceeds the capacity, the delivery should be scheduled for the next daySolved1.1KViews0likes7CommentsHelp formatting all websites the same
I have a column with a bunch of website links that are all formatted differently so extract and split column aren't working as it just removes all other websites that don't follow that format. I have websites starting with: https://www. or http:// or www. and some with no beginning to the link. Then some of the web links end with a / after the .com I'm wanting all websites to be formatted as domains so it would just be: websitename.com I'm not sure how to do this with a conditional column, custom column, calculated column or what. If I use split or extract it just messes everything up and makes things even more different. Any ideas? Please see reference picture to see what I'm working with.Solved446Views0likes1CommentDax Query Not working
CurrentMonthLastYearCount = VAR SelectedMonth = MAX(Query1[SetupDate]) VAR LastYearSameMonthStart = EOMONTH(SelectedMonth, -12) + 1 VAR LastYearSameMonthEnd = EOMONTH(SelectedMonth, -12) RETURN CALCULATE( SUM(Query1[NewCount]), Query1[SetupDate] >= LastYearSameMonthStart && Query1[SetupDate] <= LastYearSameMonthEnd ) I am trying to write a query which shows current month last year in my matrix based on slicer date selection but this query wont return any reuslts and would show up as blankSolved1.1KViews0likes4CommentsDAX Calculation find max value until certain date per employee (many-to-many)
Hello guys, i have a problem that is driving me nuts and I am coming to you for help. I have two tables: The first one details the working schedules per employee. It shows the schedule and the date it was submitted. The second one is an order table and it contains working orders, a date and the employee. I would like to get two new columns in the second table specifying the employee schedule. I specify columns as I need to do further calculations and I need to visualize the date without the employee field displayed. Even though any idea is welcome. Notice that both tables can have multiple times the same employee and the dates are not comparable! Example: Any recommendations? Thank you so muchSolved803Views0likes3CommentsSorting Matrix Data Based on Slicer Selection
Hi Everyone, I want to sort the data in a matrix in a specific order. When I select a value in the slicer. Below is the raw data: The matrix visual contains Product and Value [Measure]. Raw Data Slicer The order in which the products need to be sorted depends on the year value selected in the slicer. Raw Data : Table Product Year Value P3 2023 100 P2 2023 200 P1 2023 300 P8 2023 40 P6 2023 100 P1 2024 200 P3 2024 300 P2 2024 40 P14 2024 100 P12 2024 200 slicer : Year 2023 2024 Required order, when we click on slicer : Order Required 2023 2024 Order order P1 P1 P2 P2 P3 P3 P6 P12 P8 P14Solved1.3KViews0likes4CommentsAuto hide blank column from power BI matrix
Hello Community !!! MFelix I need help to hide blank valued column from Matrix. as below SS Jun-24 is blank valued, so it should hide from matrix only when I select AL in slicer. Simmilerly there is other Month are blank in KI & TA (Comp). I belive that, Jun-24 is visible because other Comp have values in that month. here is data model. Any kind help would be appreciated. Link to get PBIX file: https://drive.google.com/file/d/1h6dWiV5biMMF8DE8_qmmNLKGARUJbN_3/view?usp=drive_link AvgVal : average of values %Diff: % difference between curent month average with available prior month used DAX code for %Diff %Diff = VAR CurrentDate = SELECTEDVALUE('Transaction'[Date]) VAR CurrentCompName = SELECTEDVALUE('Transaction'[Comp]) VAR CurrentArticle = SELECTEDVALUE('Transaction'[Cat]) VAR _last = CALCULATE( MAX('Transaction'[Date]), FILTER( ALL('Transaction'), 'Transaction'[Comp] = CurrentCompName && 'Transaction'[Cat] = CurrentArticle && 'Transaction'[Date] < CurrentDate && NOT(ISBLANK('Transaction'[Value])) && 'Transaction'[Value] > 0 ) ) VAR AvgSoldAmtPrevMon = CALCULATE( AVERAGE('Transaction'[Value]), FILTER( ALL('Transaction'), 'Transaction'[Comp] = CurrentCompName && 'Transaction'[Cat] = CurrentArticle && 'Transaction'[Date] = _last && 'Transaction'[Value] > 0 ) ) VAR AvgSoldAmtCurrMon = CALCULATE( AVERAGE('Transaction'[Value]), FILTER( ALL('Transaction'), 'Transaction'[Comp] = CurrentCompName && 'Transaction'[Cat] = CurrentArticle && 'Transaction'[Date] = CurrentDate && 'Transaction'[Value] > 0 && NOT(ISBLANK('Transaction'[Value])) ) ) VAR Result= IF( ISBLANK(SELECTEDVALUE('Transaction'[Value])) || SELECTEDVALUE('Transaction'[Value]) = 0, BLANK(), AvgSoldAmtCurrMon / AvgSoldAmtPrevMon - 1 ) RETURN IF(NOT(ISBLANK(AvgSoldAmtPrevMon)) && AvgSoldAmtCurrMon > 0 , AvgSoldAmtCurrMon / AvgSoldAmtPrevMon - 1, "")Solved4.4KViews0likes4CommentsCount most recent value with a rule
Hi, I'm trying to achieve the following table representation: For each Activity, count the number of IDs that are doing it in their most recent DateID. Important: there are duplicates, so keep only the alphabetical MAX. Expected: FactActivity table: My data model is: My current calculation is wrong because it is affected by the row context. (the total count should be 4) Count Most Recent Activity = VAR LatestDate= CALCULATE( MAX(FactActivity[DateID]), ALLEXCEPT(FactActivity, FactActivity[ID]) ) RETURN COUNTX(FactActivity, CALCULATE(MAX(FactActivity[Activity]), FactActivity[DateID]=LatestDate)) link to pbixSolved477Views0likes1Comment