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.
i am new to Power Bi please help me to write this code in power bi:
COUNT(IF [Closed Date]>=([Run Date]-30)and[Closed Date]<=[Run Date]
THEN [Request Id]
END )/30
Solved! Go to Solution.
For your question, here is the method I provided:
Here's some dummy data
"Table"
Create a measure.
Measure =
CALCULATE(
COUNT('Table'[Request ID]),
FILTER(
ALL('Table'),
'Table'[Closed Date] >= 'Table'[Run Date] - 30
&&
'Table'[Closed Date] <= 'Table'[Run Date]
)
) / 30
Here is the result. You can adjust the number of decimal places as needed.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
pls provide some sample data and expected output
Proud to be a Super User!
pls provide some sample data and expected output
Proud to be a Super User!
For your question, here is the method I provided:
Here's some dummy data
"Table"
Create a measure.
Measure =
CALCULATE(
COUNT('Table'[Request ID]),
FILTER(
ALL('Table'),
'Table'[Closed Date] >= 'Table'[Run Date] - 30
&&
'Table'[Closed Date] <= 'Table'[Run Date]
)
) / 30
Here is the result. You can adjust the number of decimal places as needed.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.