Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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;
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
36 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |