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
i am looking for dax for comparing past 1 month with current month for my data
Solved! Go to Solution.
@Anonymous , You can use time intelligence
example
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA
Hi @Anonymous ,
You could use PREVIOUSMONTH() function
Measure =
CALCULATE (
SUM ( 'Table'[Value] ),
PREVIOUSMONTH ( 'Table'[Date] ),
ALLEXCEPT ( 'Table', 'Table'[Category] )
)
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
Watch this video to get more clarity if possible
https://www.youtube.com/watch?v=dLON3mj0los&list=PLWQB3PEUJKRn1Y_s8whVWEoPPZa6Wm8B6&index=53
Proud to be a Super User!
@Anonymous
The Breakup of Formula like this
First to find the Last month revenue = Calculate(Total Revenue, DateAdd(Datedim[date],-1,Month)
you can compar the Data using a Table Visual by placing Date, Total Revenue, Last month Revenue (day by day copmparison)
if you want to see the cumulative then DATESMTD comes into the picture
Current MTD = Calculate(Total Revenue, Datesmtd(dAtedim[date))
Last Month MTD = Calcualte(last month revenue,Datesmtd(datedim[date)
Then you can compared MTD to MTD with an area Chart using Date as Axis to see the comparison
Proud to be a Super User!
@Anonymous , You can use time intelligence
example
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA
hi amit
i tried this dax for calculting last year calls but it is not returing the correct count.
Hi amit
i tried using ur dax on my data but its not displaying any values.
could you plz help me.
@Anonymous , hope the problem is number type, else use count in place of sum .
Can you share the error, click on details and provide that
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 |
---|---|
107 | |
94 | |
77 | |
63 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |