Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
87 | |
83 | |
65 | |
49 |
User | Count |
---|---|
127 | |
108 | |
89 | |
70 | |
66 |