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 have a measure calculating the quarter on quarter unit price changes (call it Measure1). I now want to make another measure (Measure2) that multiplies (1+ values of Measure1) in all quarters up to the selected quarter. Sample data below:
Year-Quarter | Unit Price (Measure1) | Measure2 (output) |
2022 Q1 | - | 1+0% = 100% |
2022 Q2 | 30% | (100%)*(1+30%) = 130% |
2022 Q3 | 15% | (100%)*(130%)*(1+15%) = 149.5% |
Measure2 =
// Variable for (1+Measure1) value
VAR _n = IF(ISNUMBER('Calculations'[Unit Price]), 'Calculations'[Unit Price] + 1)
RETURN CALCULATE(PRODUCTX(
FILTER( ALLSELECTED('Date'[DecimalDate]),
'Date'[DecimalDate] <= SELECTEDVALUE('Date'[DecimalDate]) ),
_n) )
My returns Measure2 output is ridiculously large numbers. Snapshot here. I cropped out the row names but each row represents a different supplier. My data starts at 2019 Q3 so Measure 2 should equal (Unit Price + 1) for that quarter. Everything after that should be a product building off of it. But you can see some funky numbers (eg row 2).
You can't really put SELECTEDVALUE into a CALCULATE. Use variables instead.
Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
13 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
20 | |
14 | |
11 | |
10 | |
10 |