Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

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
amitchandak
Super User
Super User

@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
)

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.