Forum Discussion
shilunannan
5 years agoNew Member
how to calculate difference between two rows in a table ?
Hi, Any help is appreciated. I'm creating a dashboard to display pricing info. With selecting two price curves, the corresponding grades are displayed in the table beside it. I'm wondering if th...
- 5 years ago
Hi shilunannan ,
Create a measure as below:
Measure = IF(ISINSCOPE('Table'[Price Curve]), SUM('Table'[Price]), CALCULATE(SUM('Table'[Price]),FILTER(ALLSELECTED('Table'),'Table'[Price Curve]=MAX('Table'[Price Curve])&&'Table'[EOD Date]=MAX('Table'[EOD Date])))-CALCULATE(SUM('Table'[Price]),FILTER(ALLSELECTED('Table'),'Table'[Price Curve]=Min('Table'[Price Curve])&&'Table'[EOD Date]=MAX('Table'[EOD Date]))))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
v-kelly-msft
Community Support
5 years agoHi shilunannan ,
Create a measure as below:
Measure =
IF(ISINSCOPE('Table'[Price Curve]),
SUM('Table'[Price]),
CALCULATE(SUM('Table'[Price]),FILTER(ALLSELECTED('Table'),'Table'[Price Curve]=MAX('Table'[Price Curve])&&'Table'[EOD Date]=MAX('Table'[EOD Date])))-CALCULATE(SUM('Table'[Price]),FILTER(ALLSELECTED('Table'),'Table'[Price Curve]=Min('Table'[Price Curve])&&'Table'[EOD Date]=MAX('Table'[EOD Date]))))
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!