Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello Team,
I am trying to calculate sales for the last 30 days using the below formula but it does not seem to be working:
Hi @Hasvine2022
Please refer to this similar thread Solved: Calculate Sales Past 30 Days - Microsoft Power BI Community
If possible, can you please show the relationship between Sales and Calendar tables? Inappropriate relationship may cause different results.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi,
I think this thread could help you: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Show-30-days-data-in-visual-before-the-date-s...
New Measure = VAR __date_selected = MAX ( 'Calendar'[Date] ) // assuming there exists a calendar table in your model, and Calendar[Date] is sliced VAR __period = DATESINPERIOD ( 'Calendar'[Date], __date_selected, -30, DAY ) VAR __inbetween = CALCULATE ( MAX ( factTable[Date] ), ALL ( 'Calendar'[Date] ) ) IN __period // slcier must be removed in order to keep all other dates in sight RETURN IF ( __inbetween, [Old Measure] )
Hi,
Thank you for your help. It does not seem to work. 😞
User | Count |
---|---|
87 | |
84 | |
67 | |
62 | |
57 |
User | Count |
---|---|
138 | |
112 | |
94 | |
82 | |
71 |