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,
I need to calculate revenue for current 4 weeks of the selected date and previous 4 weeks?
How can we achieve this? I have dates only for weeks
Regards,
Prath Sable
hi @PrathSable
First, you need to create a relationship between "Calendar" table and "MIS_Details" table
https://radacad.com/do-you-need-a-date-dimension
Now use all date field from calendar in the visual.
and then for measure[Previous 28 days Sales], remove .[Date] from the formula
Previous 28 days Sales = CALCULATE([Total Sales],DATEADD('Calendar'[reporting_date],-28,DAY))
and here is sample pbix file, please try it.
Regards,
Lin
@PrathSable , Check my Blog on week, Check for the last 12 week formula, just change that as per your need
Or use those as a filter in some other formula
Hi @amitchandak :
The link you shared was the first thing I checked. Doesnt fulfill what I want to see 😞
What I want is when I select a date it should give me data for current 4 weeks and then the 4 weeks prior to that.
Also, it should give me the previous weeks dates and Gross Sales.
Attaching PBIX file for your reference.
https://drive.google.com/file/d/1Ij2Mcp1JsrvKWOIULaEiJzWNQZg5V7tU/view?usp=sharing
Regards,
Prath Sable
@PrathSable , table 2 should be possible using my blog.
For table 1 and 3 , use relative Date slicer
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
or this approach
https://www.youtube.com/watch?v=duMSovyosXE
I will try to check pbix in sometime
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |