The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
Posting for a follow-up on the Quarter-over-Quarter calcualtions!
Semantic model structure
My Calculation requirements -
Here's some sample data to show you the drill down that I need to configure.
At the day level, the Calendar Days Interval for Current, PQ, and PM is always 1. The spill-over logic is that it should include the Average Volume for the missing days as with June 30, where the Volume PQ is 5 which is the Average Volume for March 30 + the Average Volume for March 31, but the denominator is still 1. For all other days, like the case with July 1 and July 2, it should refererence the appropriate Previous Day intervals by Quarter, or Month to get the appropriate Average Volume.
Any help at all will be greatly appreciated!
Solved! Go to Solution.
Hi @ssrinath,
Thanks so much for the detailed follow-up question.
You're right when you're looking at the Day level, the AverageVolume_PM should divide by 1, because you're only dealing with one day’s data. But when you roll up to the Month or Quarter level, the denominator should reflect the actual number of calendar days in that previous period.
To make this work properly in the visual, we can adjust the AverageVolume_PM measure to check the level you're currently viewing. This way, it behaves differently depending on whether you are looking at Day, Month, or Quarter.
AverageVolume_PM =
VAR IsDayLevel = ISINSCOPE('Calendar'[Date])
VAR VolPM = [Volume_PM]
VAR DaysPM = [Calendar Days_PM]
RETURN
DIVIDE(VolPM, IF(IsDayLevel, 1, DaysPM))
This makes sure: At day-level, the denominator is always 1. At month or quarter level, it uses the actual number of days from the previous month or quarter.
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.
Hi @ssrinath,
Thank you for reaching out to the Microsoft fabric community forum. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Thanks so much for your response.
Unfortunetly, it doesn't work at the Day level. It forces the AverageVolume_PM down all rows when expanded out to the Day-level hierarchy.
The calendar days_PM interval at the day hierarchy level should always be 1 as you're only iterating over a single calendar day.
At the month heirarchy level, the calendar days_PM interval should be the the interval of the previous month. So your AverageVolume_PM for July 1 should refernece the AverageVolume_PM for June 1, which it does not do as it should be 1/1, which is 1 (Volume_PM/CalendarDays_PM) .
Hi @ssrinath,
Thanks so much for the detailed follow-up question.
You're right when you're looking at the Day level, the AverageVolume_PM should divide by 1, because you're only dealing with one day’s data. But when you roll up to the Month or Quarter level, the denominator should reflect the actual number of calendar days in that previous period.
To make this work properly in the visual, we can adjust the AverageVolume_PM measure to check the level you're currently viewing. This way, it behaves differently depending on whether you are looking at Day, Month, or Quarter.
AverageVolume_PM =
VAR IsDayLevel = ISINSCOPE('Calendar'[Date])
VAR VolPM = [Volume_PM]
VAR DaysPM = [Calendar Days_PM]
RETURN
DIVIDE(VolPM, IF(IsDayLevel, 1, DaysPM))
This makes sure: At day-level, the denominator is always 1. At month or quarter level, it uses the actual number of days from the previous month or quarter.
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.
Hi @ssrinath,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.
Thank you!
Sorry abut this - I just saw this.
I'll implement this and get back to you. Thank you so much for your response!
Hi @ssrinath,
Thank you for the followup question. Take your time testing it out, and feel free to reach back out if you run into any issues or have further questions.
Looking forward to hearing how it goes.
Thank you for using the Microsoft Fabric Community Forum.
Hi @ssrinath,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.
Thank you.
Hi @ssrinath,
Just wanted to follow up one last time. If the shared guidance worked for you, that’s wonderful hopefully it also helps others looking for similar answers. If there’s anything else you'd like to explore or clarify, don’t hesitate to reach out.
Thank you.
Hi @ssrinath,
Hope you had a chance to try out the solution shared earlier. Let us know if anything needs further clarification or if there's an update from your side always here to help.
Thank you.
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
81 | |
57 | |
48 | |
48 |