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
Solved! Go to Solution.
Hi @learner03
Try this one
Closed within 48 Hrs =
VAR CurrentDate =
MAX ( 'Calendar'[Date] )
VAR Prev_Day =
CALCULATE (
MAX ( 'Calendar'[Date] ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] < CurrentDate
&& 'Calendar'[If work day] = 1
)
)
VAR fortyeightHrs =
CALCULATE (
COUNT ( '3PL_Fulfilment'[Document Number] ),
ALL ( 'Calendar' ),
'Calendar'[Date] = Prev_Day,
'3PL_Fulfilment'[Completed in 48 hours] = "Yes"
)
RETURN
fortyeightHrs + 0
Your Trans_Previous_Day is a variable which already has a definite value before evaluating fortyeightHrs, as a result its value will not be changed when put in CALCULATE function.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @learner03
Try this one
Closed within 48 Hrs =
VAR CurrentDate =
MAX ( 'Calendar'[Date] )
VAR Prev_Day =
CALCULATE (
MAX ( 'Calendar'[Date] ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] < CurrentDate
&& 'Calendar'[If work day] = 1
)
)
VAR fortyeightHrs =
CALCULATE (
COUNT ( '3PL_Fulfilment'[Document Number] ),
ALL ( 'Calendar' ),
'Calendar'[Date] = Prev_Day,
'3PL_Fulfilment'[Completed in 48 hours] = "Yes"
)
RETURN
fortyeightHrs + 0
Your Trans_Previous_Day is a variable which already has a definite value before evaluating fortyeightHrs, as a result its value will not be changed when put in CALCULATE function.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
@learner03 , this will have a problem if only one date is selected, try like
VAR Trans_Previous_Day =
CALCULATE(
COUNT('3PL_Fulfilment'[Document Number]), filter(all('Calendar') , 'Calendar'[Date] = Prev_Day))
refer last non continuous day
This Day = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Work Date cont Rank]=max('Date'[Work Date cont Rank])))
Last Day = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Work Date cont Rank]=max('Date'[Work Date cont Rank])-1))
Last Day Non Continuous = CALCULATE([sales],filter(ALLSELECTED('Date'),'Date'[Date] =MAXX(FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])),'Date'[Date])))
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...
@amitchandak can you please check the var fortyeighthrs line ,will it have count or count rows function as it is not counting number of rows where the value in column says "yes"
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!