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.
Hi
I have 3 tables
Date ClaimRoot WCCSnapshot
DateID ClaimID WCCID
CalendarDate ReportedDateID ClaimID
ClaimNumber AsofDate
ClaimAmt
I am planning to write a measure which takes in date from asofDate and calculate whole ClaimAmt for the reportedyear
For example
ASofDate 04/31/2016 then ClaimAmt should be calculated for ReportedDate 04/31/2015 to 04/31/206.
I wrote a measure as below
CALCULATE( Sum( [ClaimAMT)FILTER(Date,
Date[CalendarDate]>=Max(WCCSnapshot[AsofDateStart])&& Date<=Max(WCSnapshot[AsofDate])))
I wrote a calculated colm in WCCSnapshot for previous year date AsofDateStart
this measure give me error saying . The Expression refers to multiple columns. Multiple columns cannot be converted into scalar value
Please help me with this
Thank you all
Hi Vicky,
According to your description, you need to calculated the total ClaimAmt for ReportDate from to previous year to the AsofDate, right?
If that is the case, please add a calculated column in Date table
PreviousYear = DATEADD('Date'[CalendarDate],-1,YEAR)
Then add a calculated column in WCCSnapshot table
PreviousYearDate = LOOKUPVALUE('Date'[PreviousYear],'Date'[CalendarDate],WCCSnapshot[AsofDate])
Then you can calcualte total ClaimAmt use the DAX expression below.
= CALCULATE(SUM(ClaimRoot[ClaimAmt]),FILTER(ClaimRoot,ClaimRoot[ReportDateID]>=LOOKUPVALUE(WCCSnapshot[PreviousYearDate],WCCSnapshot[ClaimID],ClaimRoot[ClaimID])&&ClaimRoot[ReportDateID]<=LOOKUPVALUE(WCCSnapshot[AsofDate],WCCSnapshot[ClaimID],ClaimRoot[ClaimID])))
Regards,
I haven't wired this up yet, but you have a syntax error in your formula below, there should be a comma "," in front of FILTER.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |