cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
admin11
Super User
Super User

When i try to convert YTD expression to LYTD i get null display

Hi All

 

I have below YTD expression working fine :-

Expense_YTD _ =
var _max = date(year(today())-0,month(today()),day(today()))
return
TOTALYTD(GL[AMOUNT],'Date'[Date], GL[1_EXP] = "EXP",'Date'[Date]<=_max)
 
From the above expression , i try to modify to LYTD , i get null return :-
 
admin11_0-1616156956470.png

My PBI file :-

 

 

Paul

2 REPLIES 2
amitchandak
Super User
Super User

@admin11 , Please check the file attached after signature

Expense_LYTD_ = 

var _max = date(year(today())-1,month(today()),day(today()))

return

CALCULATE(TOTALYTD(GL[AMOUNT],'Date'[Date], GL[1_EXP] = "EXP"),'Date'[Date]<=_max)

@amitchandak 

Your expression working fine.

But when i click on month jan till march , i cannot get the following :-

Jan return -376 m

Feb return -488 m

Mar return -501 m

it keep display -501m

Below link is my PBI file :-

https://www.dropbox.com/s/38u4j3fpumy217k/PBT_V2021_382%20TI_SI_GL%20SAMPLE%20how%20to%20get%20jan%2...

 

Paul

 

Helpful resources

Announcements
Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors