cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

Need to write sql query from dax can anybody help me

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])
1 REPLY 1
Highlighted
Super User IV
Super User IV

@Venkateswara_ra ,

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
)

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors