Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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;
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 45 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 31 | |
| 28 | |
| 24 |