Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
admin11
Memorable Member
Memorable Member

How to convert 2 expression into 1 ?

Hi All

 

Now  i need 2 expression :-

 
_LYTD_OTH_IN =
var _max = date(year(today())-1,month(today()),day(today()))
return
TOTALYTD(('GL'[AMOUNT_OTH_IN]),dateadd('DATE'[Date],-1,year),'DATE'[Date]<=_max)

AMOUNT_OTH_IN =
CALCULATE(
SUM(GL[AMT])*-1,
FILTER(
GL,
GL[1_OTH]="OTH"
)
)
May i know how to combine above 2 into 1 ?
 
Paul

 

 

1 REPLY 1
amitchandak
Super User
Super User

@admin11 , Try like

 

_LYTD_OTH_IN =
var _max = date(year(today())-1,month(today()),day(today()))
return
CALCULATE(
SUM(GL[AMT])*-1,
FILTER(
GL,
GL[1_OTH]="OTH"
), DatesYTD(dateadd('DATE'[Date],-1,year)),'DATE'[Date]<=_max)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors