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 ,
Have you tried importing data by using a native database query? Put your query in the SQL statement box, which appears when you expand the Advanced options section of the Oracle database dialog. Power BI Desktop does not support Oracle native queries that execute a stored procedure.
Since there is no Oracle database installed, the query I executed with Sql Server is as follows.
SELECT COUNT(*), ABS(AVG( DATEDIFF(dd,convert(DATE,[ENTERED_DATE]),convert(DATE,[:P_DATE_FROM]))))/30 AVG_AGE_OF_ACCOUNT
FROM [CaseTest].[dbo].[Dates_2]
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.