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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
admin11
Memorable Member
Memorable Member

How to add one more condition to GL YTD expression

Hi All,
 
Below expression work fine :-
_YTD REV = CALCULATE(CALCULATE(GL[AMOUNT],DATESYTD('Date'[Date],"12/31")), GL[1_REV] = "REV")
 

I like to add SOURCE=TS into above expression , I try below :-

_YTD REV TDS = CALCULATE(CALCULATE(GL[AMOUNT],DATESYTD('Date'[Date],"12/31")), GL[1_REV] = "REV",filter(SALES,[SOURCE] = "TS"))
 
it Return blank.
 
Below is my PBI file :-
 
Paul
1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @admin11 ,

 

is there a reason for the double Calculate?

Try the following measure:

_YTD REV TDS =
CALCULATE(
    [AMOUNT],
    DATESYTD( 'Date'[Date], "12/31" ),
    GL[1_REV] = "REV",
    FILTER( SALES, [SOURCE] = "TS" )
)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

2 REPLIES 2
selimovd
Super User
Super User

Hey @admin11 ,

 

is there a reason for the double Calculate?

Try the following measure:

_YTD REV TDS =
CALCULATE(
    [AMOUNT],
    DATESYTD( 'Date'[Date], "12/31" ),
    GL[1_REV] = "REV",
    FILTER( SALES, [SOURCE] = "TS" )
)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Hey @admin11 ,

 

I think I found the error.

The measure should look like that:

_YTD REV TDS = 
CALCULATE(
    [AMOUNT],
    DATESYTD( 'Date'[Date], "12/31" ),
    GL[1_REV] = "REV",
    GL[SOURCE] = "TS"
)

 

But the problem is that the column GL[SOURCE] doesn't contain any values "TS". For that reason the measure is always empty.

Please let me if you need further assistance.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors