Forum Discussion
gmasta1129
4 years agoResolver I
IF/OR Statement with Measure & Column
I created a measure which sums the column "profit/loss" by column "master portolio id"... Net FX P&L2 = CALCULATE ( SUM ( 'daily_report'[profit/loss]), FILTER ( ALLSELECTED ( 'daily_report' ),...
- 4 years ago
Hi,
Thank you for your message.
Could you please try something like below?
Net FX P&L2 Sample Data 2 measure: = VAR _masterid = MAX ( SampleData2[Master Portfolio ID] ) VAR _currentdate = MAX ( SampleData2[Run Date] ) RETURN SUMX ( ADDCOLUMNS ( FILTER ( SampleData2, SampleData2[Facility Code] = SampleData2[Master Portfolio ID] ), "@expectedmeasure", CALCULATE ( SUMX ( FILTER ( ALL ( SampleData2 ), SampleData2[Master Portfolio ID] = _masterid && SampleData2[Run Date] = _currentdate ), SampleData2[Profit/Loss] ) ) ), [@expectedmeasure] ) + 0
gmasta1129
4 years agoResolver I
Worked perfectly. Thank you for your help! 🙂