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,
I have cretaed this measure wihich is RYR (ie July 2018 till June 2019)
Any idea how I could get the 12 months prior July 2018 (ie.July 2017 till June 2018)
RYR = CALCULATE( Grouped[GRP T QTY], DATESINPERIOD(dDate[Date], MAX(dDate[Date]), -1,YEAR ) )
Solved! Go to Solution.
@Ashish_Mathur Your measure didn't work but with some adjustments I manged to get it working. Thanks to your idea I was able to get the correct measure.
RYR = CALCULATE( Grouped[GRP T QTY], DATESINPERIOD(dDate[Date], MAX(dDate[Date]), -1,YEAR ) )
12M Prior RYR =CALCULATE(Grouped[RYR],SAMEPERIODLASTYEAR(dDate[Date]))
Hi,
What is Grouped[GRP T QTY]? That looks like a column but the first input to the CALCULATE() function should be a measure. I do not understand.
@Ashish_Mathur GRP T QTY is a sales measure for unit sales
GRP T QTY = SUM(Grouped[quantity])
Hi,
Try this measure
RYR = CALCULATE([GRP T QTY],DATESYTD(dDate[Date],"30/6"))
RYR Previous = CALCULATE([RYR],SAMEPERIODLASTYEAR(dDate[Date]))
Hope this helps.
@Ashish_Mathur Your measure didn't work but with some adjustments I manged to get it working. Thanks to your idea I was able to get the correct measure.
RYR = CALCULATE( Grouped[GRP T QTY], DATESINPERIOD(dDate[Date], MAX(dDate[Date]), -1,YEAR ) )
12M Prior RYR =CALCULATE(Grouped[RYR],SAMEPERIODLASTYEAR(dDate[Date]))
You are welcome.
@brinkyhow about changing -1 to -2
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k Thanks for your reply, did get a value, but defiently not a correct one.
@brinky if your -1 is giving the correct data I expect -2 will also give the correct data. May be you want to check your last year data as well.
Although if you can share sample pbix, it will help you to get the solution,
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k Maybe this could help as unfortunately I cannot share, ammount should be in region of 151,174 in measure3 (where I did -2)
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 |
---|---|
107 | |
93 | |
77 | |
63 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |