Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I have a measure that calculates the sales of a product over a rolling 3 months period (user will select the month from a slicer). So for example below in screen shot, there were only 5 stores that ordered in December as represented in DEC Count column. However the DEC R3M Sales column is the total sales over Oct/Nov/Dec for that store. Then the count is "If sales > 0 = 1 , 0". THere were 8 stores that ordered product at least once over this three month period.
My R3M Sales measure in PBI is working as expected and is below;
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
@lbendlin
Thanks, I think I have answered the question just a few seconds before your post
Download my example PBIX solution from Onedrive
Create another identical calendar table, call it Picklist and set the retalationships to inactive
Create measures
Has data =
CALCULATE(
INT(NOT(ISEMPTY(Yourdata))),
USERELATIONSHIP(Picklist[Date],Yourdata[Date]))
Sales in 3 months =
var mypick = SELECTEDVALUE('Picklist'[Month offset])
RETURN
CALCULATE(SUM(Yourdata[Sales]),
'Calendar'[Month offset] >= mypick - 2 &&
'Calendar'[Month offset] <= mypick )
Use the picklist period (not the calendar) in your slicer with the measure to filter your slicer
Use the calendar period (not the picklist) in your visual
Test and then adapt to satisfy your exact requirements
Please click the [accept as solution] and the thumbs up button. Thank you
Thank you, but this is not the solution. In the data you created you had Store # 3 having sales of $4705 in November, $2835 in December and 0 in January for a total sales amount of $7,540 over past 3 months
The measure i wrote in my initial question of;
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
81 | |
53 | |
37 | |
35 |