Need to write sql query from dax query can anybody help me with that
Total Calendar Days Pending – WIP Transactions = |
VAR SelLastDate = [Selected Last Date v2] |
VAR SummaryTable = |
CALCULATETABLE( |
SUMMARIZE(ClaimCase, ClaimCase[ClaimId], ClaimCase[Calendar Days Pending]), |
USERELATIONSHIP(ClaimCase[CaseCreationDateId], DimDate[DateId]), |
ALL(DimDate), |
ClaimCase[CaseCreatedOn] <= SelLastDate, |
ClaimCase[CompletedOn] = BLANK()) |
RETURN |
SUMX(SummaryTable, ClaimCase[Calendar Days Pending]) |
Something like this
Select sum( ClaimCase[Calendar Days Pending]) from (
select distinct ClaimCase.[ClaimId], ClaimCase.[Calendar Days Pending]
from ClaimCase inner join DimDate on (ClaimCase.[CaseCreationDateId]= DimDate.[DateId])
where ClaimCase. [CaseCreatedOn] <= ? // Date you have to pass
and ClaimCase[CompletedOn] is null
)
Proud to be a Super User!
User | Count |
---|---|
384 | |
221 | |
117 | |
107 | |
103 |