Showing results for 
Search instead for 
Did you mean: 

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 =
    SUMMARIZE(ClaimCase, ClaimCase[ClaimId], ClaimCase[Calendar Days Pending]),
        USERELATIONSHIP(ClaimCase[CaseCreationDateId], DimDate[DateId]),
        ClaimCase[CaseCreatedOn] <= SelLastDate,
        ClaimCase[CompletedOn] = BLANK())
SUMX(SummaryTable, ClaimCase[Calendar Days Pending])
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


Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors