Forum Discussion
johnsiah91
4 years agoFrequent Visitor
Translating where clause or statement in SQL to Power BI
Hi, I am having a SQL query to get the number of permits falling under the following where statement: WHERE (P.APPLYDATE BETWEEN @STARTDATE AND @ENDDATE OR P.ISSUEDATE BETWEEN @STARTDATE AND @...
johnsiah91
4 years agoFrequent Visitor
Thank you so much for this. I tried building on your DAX code but got stuck again. Please allow me to expand a little further.
To recap:
This is what I get from the where clause
WHERE (P.APPLYDATE BETWEEN @STARTDATE AND @ENDDATE
OR P.ISSUEDATE BETWEEN @STARTDATE AND @ENDDATE)
My goal is to get an average of the sum of the PR_TIME_DAYS based on COMPLETEDATE.
And this is what I have done so far:
Using the code you shared with me, I am able to get the count of COMPLETEDATE, which is 5.
The question now is how do I get the sum of the PR_TIME_DAYS based on the 5 rows, which is supposed to 20.
Thanks!