Forum Discussion
Summing a calculated column using Naturalinnerjoin not working
- 5 years ago
All the +0 does is take care of blanks. Using COALESCE(expression, 0) does the same.
That doesn't fix data lineage. Data Lineage is a pretty deep topic. Good intro to it here.
You can try this for your last variable though:MeasureName = SUMX( NATURALINNERJOIN( GrossClaimsReserve, Reinsurance ), [Gross Claims Reserve] - [Gross Reinsurance USD] )I don't see the need for that last ADDCOLUMNS. I'm not saying my suggestion will fix it, but it won't destroy any data lineage to this point. Without data though, it is really hard to say. I am not so good at DAX as to be able to visualized all of the tables you are creating in memory and how they flow through.
When you say you took care of data lineage, how? ADDCOLUMNS does not preserve data lineage. See ADDCOLUMNS – DAX Guide for more info, in addition to the other articles referenced from that page - specifically using GENERATE and ROW instead of ADDCOLUMNS and SUMMARIZE - Using GENERATE and ROW instead of ADDCOLUMNS in DAX - SQLBI. Depending on how this is working in your visuals, you may be able to use SUMMARIZECOLUMNS(), though that cannot evaluate filter context, but it is a great query function.