Forum Discussion
Converting SQL query to DAX
Anonymous Hard to make heads or tails of the SQL query, you might want to instead list sample data and expected output. But, seems like a Complex Selector of the form:
Measure =
VAR __Min = MIN('ReportDate'[Date])
VAR __Max = MAX('ReportDate'[Date])
RETURN
IF(MAX('AGGR_Transaction_ChannelUtilization'[EOMDate])>= __Min && MAX('AGGR_Transaction_ChannelUtilization'[EOMDate])<= __Max,1,0)
Otherwise, Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Greg_Deckler Thanks for your prompt reply
Please see the original post with the full query. The Date range given in the query is just an example , but the in actual PowerBI report user will use the slicer as shown above and based on that my DAX has to calculate the total members for a costcenter. Basically I dont want to count members twice within a given date range that user selects .
Please let me know if this is ok and/or if you need anything else.
Thanks again
- Greg_Deckler5 years agoCommunity Champion
Anonymous Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.- Anonymous5 years agoNot applicable
I have taken another shot at trying and explaining the scenario. Hopefully this makes sense now . Please see the original post for details
Thanks