Forum Discussion
kruzack
3 years agoFrequent Visitor
Adding new field to Calculated Table
Hi All, I have created 2 calculated tables from my base data, and then I am joining the 2 tables using naturalleftouter join In both tables I have Date, CustomerID and Status. Below is how the...
- 3 years ago
kruzack
For a measure please tryPractice = VAR fromtable = SELECTCOLUMNS ( CollectionMonthlyDailyFrom, "loanno", CollectionMonthlyDailyFrom[LOANNO] & "", "dpd_group", CollectionMonthlyDailyFrom[DPD Group], "report_date", CollectionMonthlyDailyFrom[REPORT_DATE], "DPD Group Num", CollectionMonthlyDailyFrom[DPD Group Num] ) VAR totable = SELECTCOLUMNS ( CollectionMonthlyDailyTo, "loanno", CollectionMonthlyDailyTo[LOANNO] & "", "dpd_group_1", CollectionMonthlyDailyTo[DPD Group], "report_date_1", CollectionMonthlyDailyTo[REPORT_DATE], "@DPD Group_1 Num", CollectionMonthlyDailyTo[DPD Group Num] ) VAR Result = ADDCOLUMNS ( NATURALLEFTOUTERJOIN ( fromtable, totable ), "DPD Group_1 Num", COALESCE ( [@DPD Group_1 Num], 1 ) ) RETURN COUNTROWS ( FILTER ( Result, [DPD Group_1 Num] > [DPD Group Num] ) )