Forum Discussion
admin11
Memorable Member
5 years agoHow to insert condition into my _YTD_EXP_ expression ?
Hi All I have below expression working fine. _YTD_EXP_ = CALCULATE(CALCULATE(GL[AMOUNT_EXP_],DATESYTD('Date'[Date],"12/31"))) Above expression will display all expense. i also i have below ex...
- 5 years ago
Hi, admin11
Sorry, I don't quite understand what you mean. In your pbix, the 1_EXP_SALARY slicer can filter _YTD_EXP_ normally. Why do you still need to insert condition into my _YTD_EXP_ expression?
Maybe you can try formula as below:
_YTD_EXP_1 = CALCULATE ( SUM ( GL[AMT] ) * 1, FILTER ( GL, GL[1_EXP] = "EXP" ), DATESYTD ( 'Date'[Date], "12/31" ), FILTER ( GL, GL[1_EXP_SALARY] = "Yes" ) )Best Regards,
Community Support Team _ Eason
v-easonf-msft
Community Support
5 years agoHi, admin11
Sorry, I don't quite understand what you mean. In your pbix, the 1_EXP_SALARY slicer can filter _YTD_EXP_ normally. Why do you still need to insert condition into my _YTD_EXP_ expression?
Maybe you can try formula as below:
_YTD_EXP_1 =
CALCULATE (
SUM ( GL[AMT] ) * 1,
FILTER ( GL, GL[1_EXP] = "EXP" ),
DATESYTD ( 'Date'[Date], "12/31" ),
FILTER ( GL, GL[1_EXP_SALARY] = "Yes" )
)
Best Regards,
Community Support Team _ Eason
- admin115 years ago
Memorable Member