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 there,
Im trying to calculate a MOM%, but I can't get the measure to calculate the Current Month or the Previous Month Value.
I've tried:
=Calculate(sum(sales),PreviousMonth(Date))
=Calculate(sum(sales),DateAdd(date,-1,Month))
=Var MaxMonth = Max(Date[Month])
Var MaxYear = Max(Date[Year])
Return
Calculate(sum(sales),Month(date)=MaxMonth-1,Year(date)=MaxYear))
I built this measure on top of an already working one with the formula =Calculate(sum(sales),PreviousMonth(Date))
but when I try it with these values, the result I get is the Total of all period.
*Edit* - I had to remove the printscreen due to NDA.
Solved! Go to Solution.
That didn't work.
However, what worked was, adding to each of my variables a filter for the previous month and same year and then sum them all
@Anonymous , Previous month give complete last month data,
So the options you have
Calculate(sum(Sales[sales]),DateAdd(date,-1,Month))
or
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
And you have use date and related field only from date table.
Date table should be marked as date table
refer if needed
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
That didn't work.
However, what worked was, adding to each of my variables a filter for the previous month and same year and then sum them all
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 |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |