March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi,
I am so happy that I found this forum. I have on question.
In power querry I have one column called Value which has few attributes like quantities, sales, COGS. In this querry we can find data for ACT period and last year. By creating explicit measures we created Calculated fields MTD/YTD/YTG/FY all referenced to this value column.
So basically our file is capable of reuturning number of Pieces sold, NSR and COGS for specific month selected in calendar table for PY and actuals. (for November it gives Nov MTD, YTD, FY, YTG)
Last this which bothers us is how to create one additional field to return difference between let's say NSR MTD Nov of this year vs PY. Let's start from the fact is it possible.
If needed I can give overview of file and formulas. Hope you can understand me. It is not easy for me to understand myself 🙂
Regards,
Filip
Solved! Go to Solution.
The important realization (I think...?) is that measures can references other measures.
Sales := SUM(Transactions[SaleAmt])
SalesPY := CALCULATE([Sales], SAMEPERIODLASTYEAR(Dates[Date])
Sales Delta := [Sales] - [SalesPY]
So, the general answer to "how do I take the difference between 2 measures" is... well, just subtract them 🙂
The important realization (I think...?) is that measures can references other measures.
Sales := SUM(Transactions[SaleAmt])
SalesPY := CALCULATE([Sales], SAMEPERIODLASTYEAR(Dates[Date])
Sales Delta := [Sales] - [SalesPY]
So, the general answer to "how do I take the difference between 2 measures" is... well, just subtract them 🙂
@AnonymousCan you offer any pointers on how to solve for the below scenario? I have a clustered column chart where I'm pulling in Revenue, and slicers created by What If parameters for changes in price and demand. I want to calculate the impact on revenue after changes in price and demand, which I can do if the changes in price and demand are both positive. But if the change in either price or demand are negative, adding the difference between price and demand won't work (see second table). I'm not looking for anyone to solve this for me but I would love to hear opinions on which DAX functions to use to handle the measure I'm creating when there are negative values in either price or demand.
Revenue | 5 |
Change in Price | 5 |
Change in Demand | 11 |
Sum of changes in price and demand relative to revenue | 6 |
Revenue plus Changes in Price and Demand | 11 |
Revenue | 5 |
Change in Price | -5 |
Change in Demand | 11 |
Sum of changes in price and demand relative to revenue | 16 |
Revenue plus Changes in Price and Demand | 21 |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
121 | |
98 | |
89 | |
72 | |
62 |
User | Count |
---|---|
140 | |
121 | |
106 | |
98 | |
94 |