Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I'm working on a report in which we a testing a new calculation method for contribution margin. One of the tasks involve creating a measure to be included in both table and visual objects, that enables the user to change the period that is calculated.
Current idea is to use the Parameter Numeric Range (1-24 months) and use that as a variable in the DATEADD function. However, I can't get this to work correctly, as I'm only able to return the sum of the measure for the specific start month selected (i.e., if selecting 4, the measure should calculate a cumulative sum of the 4 latest months prior to current month).
The current DAX measure is shown below and is returning the sum of the period 4 months prior to the comparison/current period. Worth noting, the data model is a composite model with below DAX relating to the only imported table apart from the DQ data model. However, this DAX should also be copied to other sales variables subsequently, that is resided in the DQ data model - based on current research, since the Date Dimension is within the DQ model, this shouldn't be an issue in any case?
At last, below measure was formulated by a former colleague, no longer part of the company.
I'm a little confused. Are you saying that you want the measure to return the sum of a period defined as number of months before the current month, and not including the current month? So, today is 9/20, and a user selects 4, you want the measure to sum for the period of May 1st - August 31st?
You then mention "The current DAX measure is shown below and is returning the sum of the period 4 months prior to the comparison/current period. " Do you mean it's only returning the sum of May 1st to May 31st?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
75 | |
64 | |
52 | |
47 |
User | Count |
---|---|
218 | |
88 | |
73 | |
64 | |
60 |