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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors