Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi Experts,
I am working on a Power BI report where I need to compare values between the current period and the previous period. The challenge is:
I have multiple metrics (e.g., Total calls, AVG Queue Time, Self Served %, etc.).
I also need to allow the user to select from multiple date presets ( Today vs Yesterday
, Last 7 Days vs Previous 7, This Week vs Last Week, This Month vs Last Month, This Quarter vs Last Qtr, This Year vs Last Year, Year to Date vs Prev YTD, Rolling N Days)
The comparison should dynamically work for whichever metric and date range the user selects.
Could you please suggest the best DAX approach or modeling technique to handle this scenario?
Should I create separate measures for each date preset (Today vs Yesterday
, Last 7 Days vs Previous 7, This Week vs Last Week, This Month vs Last Month, This Quarter vs Last Qtr, This Year vs Last Year, Year to Date vs Prev YTD, Rolling N Days)?
Or is there a more scalable and reusable method (maybe using calculation groups or dynamic measures)?
If possible, examples of DAX or links to best practices would be very helpful.
Thanks in advance!
Solved! Go to Solution.
Hi @manoj_0911 ,
Please check out this articles to know more about calculation groups:
Create calculation groups in Power BI - Power BI | Microsoft Learn
Calculation groups in Analysis Services tabular models | Microsoft Learn
I hope this information helps. Please do let us know if you have any further queries.
Thank you
Hi @manoj_0911
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you
Hi @manoj_0911
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.
You can handle this scenario more efficiently using Calculation Groups in Power BI (via Tabular Editor).
Instead of creating separate measures for each comparison (Today vs Yesterday, Last 7 Days vs Previous 7, etc.), build a Time Intelligence Calculation Group that dynamically applies the right date logic based on a user-selected “Date Preset” (like Day, Week, Month, Quarter, Year).
This approach is scalable, reusable, and easier to maintain, since all your metrics (Total Calls, Avg Queue Time, etc.) can automatically adapt to the selected period.
For reference, check:
Microsoft Docs – Calculation Groups
SQLBI – Dynamic Time Intelligence
Thanks
Hi, when I click the links, they do not take me to the page; they appear static or are not working. Could you please check?
Hi @manoj_0911 ,
Please check out this articles to know more about calculation groups:
Create calculation groups in Power BI - Power BI | Microsoft Learn
Calculation groups in Analysis Services tabular models | Microsoft Learn
I hope this information helps. Please do let us know if you have any further queries.
Thank you
Hi @manoj_0911 , I think we can achieve this using calculation group functionality available in Power BI, for reference: https://learn.microsoft.com/en-us/power-bi/transform-model/calculation-groups
https://community.fabric.microsoft.com/t5/Power-BI-Community-Blog/Performance-Optimization-with-Calc...
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.