detailrows
1 TopicDax
Hi , I am new to this field . My requirement is to optimize the measure which I am using in my model . Projected EFT Bi_ Monthly Date = VAR maxdate = MAX ( 'DATE TABLE'[FullDate] ) VAR mindate = MIN ( 'DATE TABLE'[FullDate] ) VAR selected_dates = VALUES ( 'DATE TABLE'[DayOfMonth] ) VAR Billingdatenotblank = CALCULATETABLE ( 'Member Recurring Service', FILTER ( 'Member Recurring Service', ( 'Member Recurring Service'[frequency] = "Bi-Monthly" && 'Member Recurring Service'[recurringServiceStatus] = "Active" ) && 'Member Recurring Service'[recurringServiceSubStatus] <> "Frozen" && 'Member Recurring Service'[firstBillingDate] < maxdate || ( ( 'Member Recurring Service'[inactiveDate] + 30 ) > maxdate ) && 'Member Recurring Service'[frequency] = "Bi-Monthly" && 'Member Recurring Service'[firstBillingDate] < maxdate ) ) VAR MRS_BiMonthly = SUMMARIZE ( Billingdatenotblank, [member_Key], [firstBillingDate], [invoiceTotal], "Projections", VAR mk = [member_key] VAR fd = DAY ( [firstBillingDate] ) VAR day2 = IF ( fd < 16, fd + 15, fd - 15 ) VAR Intersect_ = MINX ( FILTER ( 'DATE TABLE', 'DATE TABLE'[DayOfMonth] = fd || 'DATE TABLE'[DayOfMonth] = day2 ), 'DATE TABLE'[FullDate] ) RETURN MINX ( FILTER ( Billingdatenotblank, [member_Key] = mk ), Intersect_ ) ) RETURN MINX ( MRS_BiMonthly, [Projections] ) This is my dax .I am calculating the projected dated based on the frequency . Now I want to optimize this measure .since the MRS table filters are same for the frequency weekly , bi weekly etc. So I want to store this cLxulatable ( MRs ....) part so that I can reuse them in other measure. I have searched got to know about the details row expression. I have created this in tabular editor but am not getting the result . Can anyone please help me662Views0likes2Comments