Forum Discussion
Dynamic Date in select statement to Power BI Report Creation
- 4 years ago
Hi SunilRaj ,
Do you want to calculate the average of all [ASSESS_NO]?
Avg_diff = AVERAGEX ( VALUES ( OBJECTION[ASSESS_NO] ), [M_DateDiff] )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi SunilRaj ,
Does this meet your desired output?
M_DateDiff =
CALCULATE (
DATEDIFF ( MAX ( OBJECTION[ENTERED_DATE] ), MIN ( 'Calendar'[Date] ), DAY ) / 30,
FILTER (
OBJECTION,
OBJECTION[ENTERED_DATE] < MIN ( 'Calendar'[Date] )
&& (
OBJECTION[CLOSED_DATE] > MIN ( 'Calendar'[Date] )
|| OBJECTION[CLOSED_DATE] = BLANK ()
)
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello, your provided solution work for two month i.e july and Aug then after average value mismatch.
M_DateDiff =
CALCULATE (
DATEDIFF ( MAX ( OBJECTION[ENTERED_DATE] ), MIN ( 'Calendar'[Date] ), DAY ) / 30,
FILTER (
OBJECTION,
OBJECTION[ENTERED_DATE] < MIN ( 'Calendar'[Date] )
&& (
OBJECTION[CLOSED_DATE] > MIN ( 'Calendar'[Date] )
|| OBJECTION[CLOSED_DATE] = BLANK ()
)
)
)
- v-kkf-msft4 years agoCommunity Support
Hi SunilRaj ,
Do you want to calculate the average of all [ASSESS_NO]?
Avg_diff = AVERAGEX ( VALUES ( OBJECTION[ASSESS_NO] ), [M_DateDiff] )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- SunilRaj4 years agoFrequent Visitor
Thanks