Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys,
could someone help me determine which DAX function I should use to calculate a monthly floating profit measure
I have a column where the Floating Profit change monthly and I would like to have a measure giving me the Net between the first Month and the second month, and so on
The highlighted column is what am talking about. the figures here are cumulative.
I know it's a simple one, but am not sure which function to use
Appreciate any help
Majd
Solved! Go to Solution.
Ok cool, so you have a measure already that calculates the current month - [B Book Unrealized P/L]
Here's the formula for the previous month - just make sure you're using the dates from your date table (and if you don't have a date table, then add one)
[B Book Unrealized P/L - LAST MONTH] = CALCULATE ( [B Book Unrealized P/L] ,
DATEADD ( Dates[Date], -1, MONTH)
(
And here's the difference ...
B Book Unrealized P/L - MOM = IF ( [B Book Unrealized P/L]
&& [B Book Unrealized P/L - LAST MONTH],
[B Book Unrealized P/L] - [B Book Unrealized P/L - LAST MONTH]
)
Hey Majd, is the question how to calculate the difference between a month and the previous month?
Ok cool, so you have a measure already that calculates the current month - [B Book Unrealized P/L]
Here's the formula for the previous month - just make sure you're using the dates from your date table (and if you don't have a date table, then add one)
[B Book Unrealized P/L - LAST MONTH] = CALCULATE ( [B Book Unrealized P/L] ,
DATEADD ( Dates[Date], -1, MONTH)
(
And here's the difference ...
B Book Unrealized P/L - MOM = IF ( [B Book Unrealized P/L]
&& [B Book Unrealized P/L - LAST MONTH],
[B Book Unrealized P/L] - [B Book Unrealized P/L - LAST MONTH]
)
it worked as a treat @austinsense!!
I was only able to figure the first measure, and missing the logic of the second measure.
Cheers,
Majd
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |