Forum Discussion
mwadhwani
8 years agoKudo Kingpin
SQL to DAX conversion
Hello Experts, I am facing issue while converting below SQL query into DAX. Can you please help me to convert the query: SELECT COUNT(D.OperatingValue), C.StartTime, C.EndTime FROM C, D ...
- 8 years ago
Try this New Table from Modelling Tab
New Table = SUMMARIZE ( C, C[Start Time], C[End Time], "Count", CALCULATE ( COUNT ( D[Operating value] ), FILTER ( D, D[Operating value] <= 5 && D[Process Time] >= C[Start Time] && D[Process Time] <= C[End Time] ) ) ) - 8 years ago
Another way
New Table2 = CALCULATETABLE ( SUMMARIZE ( C, C[Start Time], C[End Time], "Count", CALCULATE ( COUNT ( D[Operating value] ), FILTER ( D, D[Process Time] >= C[Start Time] && D[Process Time] <= C[End Time] ) ) ), D[Operating value] <= 5 )
mwadhwani
8 years agoKudo Kingpin
nish2288
8 years agoHelper I
There is a twist.Gap is not a column in the table,Its a measure that i have calculated.
Suppose attendee 'John' have attended 3 meeting then there will be 3 rows in database table for 'john'.
There is predefined number of meeting that every attendee should attend for ex. 5 which i stored in different measure.
So Gap for John will be 5-3=2. Like wise for other attendee.