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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Currently, I have two tabs;
"Input Change by Customer Last 90 Days" Showing change in inputs for last 90 days compared to the 90 prior.
"Input Change by Customer Last 180 Days" Showing change in inputs for last 180 days compared to the 180 prior.
I want to combine the two tabs and have a slicer where you can choose 90 or 180 days instead of switching to different tabs. I created a new table with 90 and 180, created a measure: Days ago = if(HASONEVALUE('Date Blocks'[Block]), min('Date Blocks'[Block]),0)....this measure will display 0 until 90 or 180 is selected, then it will display the selection.
I try to replace a hard "90" in the formula in the attached picture with the measure [Days ago] but get this error. Please advise.
Solved! Go to Solution.
Try this:
Work Order's Last 90 Days = CALCULATE ( COUNT ( 'WO Master'[DOC_NO] ), FILTER ( 'WO Master', 'WO Master'[Enter Date] > ( TODAY () - [Days ago] ) ) )
The reason is because you are trying to use a measure ([Days ago]) in a CALCULATE FILTER argument, without explicitly calling FILTER.
This does not trigger the necessary context transition that needs to occur in order to use a measure in a CALCULATE FILTER argument.
more info here https://powerpivotpro.com/2012/06/filter-when-why-how-to-use-it/
You could also place your measure in a variable, and then reference that. The variable will calculate your measure, and then save the result as a value that you can do a boolean (True/False) filter on.
Work Order's Last 90 Days = VAR daysago = [Days ago] RETURN CALCULATE ( COUNT ( 'WO Master'[DOC_NO] ), 'WO Master'[Enter Date] > ( TODAY () - daysago ) )
Let me know if this helps!
Try this:
Work Order's Last 90 Days = CALCULATE ( COUNT ( 'WO Master'[DOC_NO] ), FILTER ( 'WO Master', 'WO Master'[Enter Date] > ( TODAY () - [Days ago] ) ) )
The reason is because you are trying to use a measure ([Days ago]) in a CALCULATE FILTER argument, without explicitly calling FILTER.
This does not trigger the necessary context transition that needs to occur in order to use a measure in a CALCULATE FILTER argument.
more info here https://powerpivotpro.com/2012/06/filter-when-why-how-to-use-it/
You could also place your measure in a variable, and then reference that. The variable will calculate your measure, and then save the result as a value that you can do a boolean (True/False) filter on.
Work Order's Last 90 Days = VAR daysago = [Days ago] RETURN CALCULATE ( COUNT ( 'WO Master'[DOC_NO] ), 'WO Master'[Enter Date] > ( TODAY () - daysago ) )
Let me know if this helps!
Perfect. Thank you!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.