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 problem when calculating the previous month of total sales.
The formulas I use are the following.
Total Units = SUM('BD'[Sales Units])
Previous MTH = CALCULATE([Total Units], DATEADD('BD'[Period],-1,MONTH))
and it gives me this problem.
I suspect it's a problem with my database, but I can't find if it's a format issue or how the data is contaminated.
can someone help me :c
Solved! Go to Solution.
Hey @AvGonzalez ,
You can try change your DAX like below:
*If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Kind Regards,
Marcel Magalhães
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Hey @AvGonzalez ,
If my post helps,pPlease consider Accept it as the solution to help the other members find it more quickly.
Kind regards
Marcel
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Hey @AvGonzalez ,
You can try change your DAX like below:
*If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Kind Regards,
Marcel Magalhães
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Thank you very much, changing my code like that fixed all the problem, thank you 😄
@AvGonzalez , You should always use date table joined to date of your table in such cases
example
Month behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Month))
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |