Forum Discussion
Sum data based on date range
- 9 years ago
Hi digant,
I tried changing both Crosss filter direction Performance - Trade & Trade - Calendar relationships to Single, but still can not define relationship between( not even single) Perfmance - Date table.
In this scenario, you can create an inactive relationship between Performance - Date table like below.
Then you should be able to create a measure to calculate the sum of Performance[Pnl] using USERELATIONSHIP Function (DAX), and show the measure on the report with other columns.
PnlVolume = CALCULATE ( SUM ( Performance[Pnl] ), USERELATIONSHIP ( 'Date'[Date], Performance[PnlDate] ) )Here the sample pbix file for your reference.:smileyhappy:
Regards
Are any of the relationships BI -Directional? Make sure they are set to Single
Hi Phil_Seamark,
I tried changing both Crosss filter direction Performance - Trade & Trade - Calendar relationships to Single, but still can not define relationship between( not even single) Perfmance - Date table.
regards,
Digant
- v-ljerr-msft9 years agoMicrosoft Employee
Hi digant,
I tried changing both Crosss filter direction Performance - Trade & Trade - Calendar relationships to Single, but still can not define relationship between( not even single) Perfmance - Date table.
In this scenario, you can create an inactive relationship between Performance - Date table like below.
Then you should be able to create a measure to calculate the sum of Performance[Pnl] using USERELATIONSHIP Function (DAX), and show the measure on the report with other columns.
PnlVolume = CALCULATE ( SUM ( Performance[Pnl] ), USERELATIONSHIP ( 'Date'[Date], Performance[PnlDate] ) )Here the sample pbix file for your reference.:smileyhappy:
Regards
- digant9 years agoHelper I