help
463 TopicsDisplaying a Row as Fixed, when it's value needs to be manipilated
*I have trouble converting the data type of Column Amount in Source ABC to Decial/Numbers for this tutorial(help needed), see data source:https://drive.google.com/file/d/1VZJv8sPPYPcLiRKyO1fkEqbcsX-dz10P/view?usp=sharing . PBIX:https://drive.google.com/file/d/1wfjbLI7nBLQU5-Qs5rGHOL2XP4uc0UR9/view?usp=sharing I am trying to include rows in a Dax calculation from a mapping table(Pivot) to a fact table(ABC). The DAX is going to look at specific rows and bring those forward. The big issue is some rows are not present in the Fact table. I also need those rows to be displayed but their values to be manipulated. An example is row "Interco capital returned", which is not in the Fact Table(ABC), it should display a fixed value of "678" TotalAmountForSelectedItems5 = CALCULATE( SUM('ABC'[Amount]), // Corrected Column Reference 'ABC'[Roll_Up_Function] IN { "Cash flow from ops - management", "Cash flow from trading", "Depreciation and amortisation", "IPEP expense", "Disposals & impairment of fixed assets", "Profit on disposal of pooling equipment", "Scrapped pooling equipment", "Impairment or valuation adjustment of pooling equipment", "Disposals or valuation adjustments of other fixed assets", "Other cash flow from trading adjustments", "Share-based payments expense", "Working capital mvts incl. provisions", "Working capital mvts excl. provisions", "Debtor movements", "Creditor movements", "Inventory movements", "Prepayment movements", "Provision movements", "Change in capex creditors", "Change in loss compensation balances", "Interco interest and guarantee fees", "Interco cash flows", "Interco royalties", "Statutory reallocations", "Internal restructuring", "Interco dividends Total", "Change in interco balances", "Change in interco recharge clearing", "FX on interco debt", "Interco capital returned" } ) amitchandak jpessoa8 lbendlin2.1KViews0likes2CommentsPrevious Year Measure for Line Chart
Hello. I am trying to create a YOY cumulative active customer by month line chart. The line should show the number of customers who made at least one purchase. One for Selected Year and another for Selected Year - 1. And, the total is rolling, so the line should be going up over time. Because there is a year filter in play, I am having difficulties writing a measure that provides a PY Active Customer line for the line chart. If I have 2026 selected, previous years' active customers is reduced. So, I have to removefilter the Calendar. However, this causes the PY active customer line ignore the month on the X axis resulting in a flat total line. Please help me write a measure that accurately calculates PY active customers and still works in a line chart. Should look something like this: Sample file here. Thanks.Solved3.4KViews0likes10CommentsRemaining Balance Depends on Prior Month
Hi everyone, I’m building a project revenue recognition system in Power BI and I want to confirm whether this type of rolling calculation is possible in DAX, given DirectQuery constraints. I’ll explain using a simplified monthly example. Each project has: • Contract Value • Total Project Days • Project Days per Month • Optional User Override (cumulative, entered at month end) Goal: calculate per month: Recognized Revenue Remaining Contract Value At the begining : Remaining = Contract Value For each month: If override exists (override is cumulative-to-date): Recognized = Override − SUM(previous months recognized) Remaining = Contract − Override If no override (straight-line on remaining): Recognized = Remaining × (Days in Month / Remaining Project Days) Remaining = Remaining − Recognized So: Remaining(month N) depends on Recognized(month N−1) Recognized(month N) depends on Remaining(month N−1) This creates a rolling dependency chain. Example. Project duration from 1st of Jan 2026 = 31st of Dec 2026 Month Remaining Start Days Remaining Days Override Recognized Jan 435,806 31 365 37,013 Feb 398,793 28 334 33,432 Mar 365,361 31 306 100,000 29,555 Apr 335,806 30 275 36,633 May 299,173 31 245 37,855 … … … … … Override is cumulative: March override = 100,000 means: March Recognized = 100,000 − (Jan + Feb) Remaining becomes: Contract − 100,000 Then straight-line continues on the new remaining. Technical Constraints • Overrides must be live (using Qirect Query) • Cannot create calculated tables • Must be done in measures But: Recognized(month N) depends on Remaining(month N−1) Remaining(month N) depends on Recognized(month N) Question Is this possible in pure DAX (with DirectQuery involved), or does this fundamentally require pre-materialization in SQL / Power Query?Solved5.2KViews0likes5CommentsDAX Query - Blank Result from Query when both parameters have multiple values
When I run my paginated report and provide the parameters I get the following error: The 'HiddenInsurerParam' parameter is missing a value. Below is my code, the idea is to create a distinct list of insurers from two different tables 'CAClaims' and 'Corsair Policy Years'. The @insurer and @insuredName parameters filter the 'CAClaims' table and @CorsairInsuredName filters 'Corsair Policy Years'. I then want a distinct list of the insurers from each, so I'm taking the union over the two filtered tables. When I only provide one value for either @insuredName or @CorsairInsuredName it works fine, however when I put two values into each I get the missing value error and I can't figure out why. CoPilot expected it was an issue with pathitem, but it wasn't able to assist in providing a workaround. The parameters will be a list of strings selected by the user from a list coming from the database. DEFINE // --- Normalise parameter delimiters: replace "," with "|" --- VAR _Insurer = SUBSTITUTE(@Insurer, ",", "|") VAR _InsuredName = SUBSTITUTE(@insuredName, ",", "|") VAR _CorsairInsuredName = SUBSTITUTE(@CorsairInsuredName, ",", "|") // --- Split parameters into tables using PATHITEM on cleaned strings --- VAR InsurerList = SELECTCOLUMNS ( ADDCOLUMNS ( GENERATESERIES(1, PATHLENGTH(_Insurer), 1), "InsList", PATHITEM(_Insurer, [Value]) ), "Insurer", [InsList] ) VAR InsuredNameList = SELECTCOLUMNS ( ADDCOLUMNS ( GENERATESERIES(1, PATHLENGTH(_InsuredName), 1), "InsName", PATHITEM(_InsuredName, [Value]) ), "InsuredName", [InsName] ) VAR CorsairInsuredNameList = SELECTCOLUMNS ( ADDCOLUMNS ( GENERATESERIES(1, PATHLENGTH(_CorsairInsuredName), 1), "CorsInsName", PATHITEM(_CorsairInsuredName, [Value]) ), "CorsairInsuredName", [CorsInsName] ) // --- Flags: only apply a filter if the parameter list is non-empty --- VAR HasInsurerFilter = COUNTROWS(InsurerList) > 0 VAR HasInsuredFilter = COUNTROWS(InsuredNameList) > 0 VAR HasCorsairInsuredFilter = COUNTROWS(CorsairInsuredNameList) > 0 // --- Apply parameter-aware filters to each source table --- VAR CAClaimsFiltered = FILTER ( 'CAClaims', // Insurer filter (on CAClaims) if provided (NOT HasInsurerFilter || SUMX ( InsurerList, INT( CONTAINSSTRING( 'CAClaims'[Insurers], [Insurer] ) ) ) > 0 ) && // Insured name filter (on CAClaims) if provided (NOT HasInsuredFilter || SUMX ( InsuredNameList, INT( CONTAINSSTRING( 'CAClaims'[Insured Name Simplification], [InsuredName] ) ) ) > 0 ) ) VAR CorsairFiltered = FILTER ( 'Corsair Policy Years', // Assured filter (on Corsair) if provided (NOT HasCorsairInsuredFilter || SUMX ( CorsairInsuredNameList, INT( CONTAINSSTRING( 'Corsair Policy Years'[Assured], [CorsairInsuredName] ) ) ) > 0 ) ) // --- Build the distinct union of insurers --- VAR AllInsurers = DISTINCT ( UNION ( SELECTCOLUMNS(CAClaimsFiltered, "Insurers", 'CAClaims'[Insurers]), SELECTCOLUMNS(CorsairFiltered, "Insurers", 'Corsair Policy Years'[Insurers]) ) ) EVALUATE AllInsurers ORDER BY [Insurers]Solved508Views0likes1CommentHelp Needed – Incorporating Task Duration Into Weighted S-Curve (Power BI / Data Modeling)
Hi everyone, I'm working on building an S-curve visualization where the X-axis represents the project timeline (date from start to end), and the Y-axis represents cumulative progress from 0% to 100% based on task completion. I’m looking to incorporate task duration into the weighting logic. Example: A task with a 10% weight scheduled from January 1–10 should have that 10% spread across those 10 days. If two tasks run in parallel during the same period (10% and 5% weights), then a total of 15% of the overall project weight occurs over the same 10-day window. Tables / Columns Used: ProjectProgressDashboard → Start_Date, Finish_Date, Duration_Days WeightsSheet → weight_percent, Weight DateTable → Date Question: Is this the correct conceptual way to model weighted duration in an S-curve (i.e., distribute task weight across its calendar span), and if so תhow should this be implemented efficiently (formula/modeling approach)? Any guidance or examples would be greatly appreciated. Thanks!Solved1.3KViews2likes8CommentsPower BI desktop - Handling Ties using DAX measure/ RANK
Hi, I have a table with multiple fields like Activity_Id, Days, Counterparty, and many other fields. My requirement is to display only 1 record per activity _id (fetch only the record with maximum values in Days column). However, there could be duplicates even in the maximum row because of other fields. In this case, fetch any random row with maximum days. I have connected to a live model so cannot create calculated columns or tables. Only DAX measure should be used.Need a simplified DAX measure to create a latest record flag as shown in the example Activity_ID Days Counterparty Is Latest Flag 1 2 A 0 1 3 A 0 1 3 B 1 2 4 A 0 2 6 B 1 3 7 A 1Solved1.8KViews0likes12CommentsHelp with dax
Hello, I wanted to know the number of employees who are active between the financial year 2024/25 (April 2024 to MAr 2025). Sample table is given below Registration Date Deduction Date Person ID 01.02.2024 25.02.2025 1 01.01.2023 15.06.2024 2 01.01.2015 24.06.2019 3 01.02.2019 22.02.2023 4 27.03.2021 16.09.2023 5 01.03.2025 15.03.2025 1 17.08.2024 31.12.2024 2 03.03.2023 12.12.2024 4 26.04.2024 12.12.2024 4 01.01.2024 08.08.2024 5 24.03.2025 1 01.01.2025 2 01.02.2024 23.03.2025 3 01.01.2025 06.06.2025 4 02.04.2025 30.09.2025 5 Result table must be as below where the latest registration is on or before 31/03/2025 and the deduction date can be empty (which implies they are still active) or must be on or after 01/04/2024. Can you please help with the dax code for this requirement? Thanks in advance. Registration Date Deducted date Person ID 24.03.2025 1 01.01.2025 2 01.02.2024 25.03.2025 3 01.01.2025 06.06.2025 4 01.01.2024 08.08.2024 5Solved1.4KViews0likes7CommentsHow to fix my DAX measures for distinct users but still be able to filter the date
Hi Community, I was informed that these are DAX measures. I have created a table with these, btw all are sources from a sharepoint online list NGUsersItems = UNION( SELECTCOLUMNS('NG - Create Request List', "Name", 'NG - Create Request List'[Created By.title]), SELECTCOLUMNS('NG - Get Templates Request List', "Name", 'NG - Get Templates Request List'[Created By.title] ), SELECTCOLUMNS('NG - Self Check Request List', "Name", 'NG - Self Check Request List'[Created By.title]) ) and I added a measure TotalNGUsers = DISTINCTCOUNT(NGUsersItems[Name]) my problem with these are whenever I add a line chart, I cannot filter it by the date table[date]. I am fairly new to power bi and I do not understand why because there is a [Created] column in this data. Any form of help or insights how I can fix this will highly be appreciated with a like and be marked as solution if it solves my problem. Thank you! This is how it looks currently. What I want it to look like is show the number of total users per year. kind of like this (this is a different measure which does not tackle the number of users but the entries)Solved1.4KViews0likes8CommentsDistinct count of users via Created By column
I have this formula CALCULATE( DISTINCTCOUNT('NG - Self Check Request List'[Created By.title]), YEAR('NG - Self Check Request List'[Created]) = YEAR(TODAY()), MONTH('NG - Self Check Request List'[Created]) = MONTH(TODAY()) - 1 ) /*CALCULATE( DISTINCTCOUNT('NG - Self Check Request List'[Created By.title]), FILTER( ALL('NG - Self Check Request List'), MONTH('NG - Self Check Request List'[Created]) = MONTH(TODAY()) - 1 && YEAR('NG - Self Check Request List'[Created]) = YEAR(TODAY()) ) )*/ it seems like this is an incorrect formula because it is showing 36, where it is only 19 users if checked manually on the sharepoint list. I fear that it is not counting distinctly thats why some counts were incorrectSolved987Views0likes5CommentsDAX for implicit aggregation: Percent of Column Total
Hi, I've been trying to re-create DAX to obtain "Percent of Column Total" that is implicitly created when we apply "show value as Percent of Column Total". When using this measure in a Matrix Visual with both Row and Column Total being displayed, I'm not able to get the right outcome in either totals. Please help. Thanks!Solved839Views0likes4Comments