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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Paulyeo11
Impactful Individual
Impactful Individual

My Supplier YTD Amount return null ?

Hi All

 

Below is my YTD expression :-
_YTD AMT = CALCULATE(SUM('SUPPLIER'[AMT_SGD]),
FILTER('Date',
'Date'[Year] = CALCULATE(max('Date'[Year]),
FILTER(ALL('SUPPLIER'),
'SUPPLIER'[Name]=MAX('SUPPLIER'[SUPPLIER NAME_])))))
 

When i select year=2020 , i hope that _YTD_AMT display 2020 sales amount , the expression return null.

Paulyeo11_0-1610015169781.png

https://www.dropbox.com/s/jid7buovc5m1p1m/PBT_SAMPLE%20100%20ROW%20JAN%202021%20V006.pbix?dl=0

Aboce is my PBI file.

 

Paul

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Paulyeo11 , Why are not using datesytd

_YTD AMT = CALCULATE(SUM('SUPPLIER'[AMT_SGD]),
  DATESYTD('Date'[Date]))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Paulyeo11 , Why are not using datesytd

_YTD AMT = CALCULATE(SUM('SUPPLIER'[AMT_SGD]),
  DATESYTD('Date'[Date]))

Hi Amit

Thank you for your help

Paul

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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