Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I created the Select Calendar Grouping parameter so users can choose their preferred view.
For the Quarter View, it goes back 8 quarters; for the Month View, it goes back 12 months; and for the Week View, it goes back 13 weeks.
I was able to implement this for the one of the report, but I’m having trouble doing the same with the reports on the same page.
The current setup for the report that working
Rows1 : Blank
Columns1: Select Calendar Grouping
The current setup for the report that not working
Rows2 : Monitor Grouping
Columns2: Select Calendar Grouping
If I switched between Rows and Columns field then the logic of Calendar Grouping will works as expected.
Below is the DAX to dynamic filtering the Calendar Grouping
Reader Head Shipment =
How do you apply CALCULATE with ALLSELECTED in the DAX above?
Hi @PeterNg ,
I can see you're having trouble implementing the calendar grouping logic across multiple reports on the same page in Power BI. Let me help troubleshoot your DAX formula for filtering based on the selected calendar grouping.
Looking at your code, I notice a few potential issues:
In your SWITCH statement, you're using asterisks (*) instead of underscores (_) in some variable references like "*str" instead of "_str"
The condition checking for all three options being selected (COUNTROWS(tmp) =3) doesn't specify what should happen in that case
Here's a corrected version of your DAX measure:
Reader Head Shipment =
VAR tmp =
SELECTCOLUMNS('Calendar Grouping', "PT", [Select Calendar Grouping])
VAR _str =
CONCATENATEX(tmp, [PT])
VAR _a =
SWITCH(
TRUE(),
COUNTROWS(tmp) = 3, 1,
CONTAINSSTRING(_str, "Quarter"), IF(SELECTEDVALUE(FISCAL_CALENDAR[FISCAL_QTR_REL]) >= -7, 1, 0),
CONTAINSSTRING(_str, "Month"), IF(SELECTEDVALUE(FISCAL_CALENDAR[FISCAL_MONTH_REL]) >= -11, 1, 0),
CONTAINSSTRING(_str, "Week"), IF(SELECTEDVALUE(FISCAL_CALENDAR[FISCAL_WEEK_REL]) >= -12, 1, 0),
0
)
RETURN _a
For the report where it's not working (with Rows2: Monitor Grouping and Columns2: Select Calendar Grouping), the issue might be related to filter context. When you have different fields in the rows, the filter context changes, which can affect how your measure evaluates.
Try these approaches:
Make sure your Calendar Grouping parameter is properly connected to both visuals
Consider using CALCULATE with ALLSELECTED to maintain proper filter context
Check if the field references in your second report match exactly with your first report
Would you be able to share what type of visuals you're using for both reports? That might help me give you more specific advice on fixing the issue.
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!