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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
venal
Memorable Member
Memorable Member

DAX Function is not working

Hello Folks,

 

I tried to create a sample report with table visual, but one value is showing wrong values.

 

Column Names:- Date, Amount

Amt=SUM(Amount)

YTD Amount= CALCULATE(Amt,DATESYTD(DATE[Date]))

PY Amount = CALCULATE(Amt,SAMEPERIODLASTYEAR(DATE[Date]))

PYTD Amount = CALCULATE(PY Amount,DATESYTD(DATE[Date]))

 

Dragged 2 visuals that is Slicer and Table. when i select slicer from 1/1/2020 and 2/25/2020. But Power BI Desktop and Excel both are showinf correct values. for 2/26 is not showing the right values in Desktop. Hoping that the DAX function is not working.

 

 
1 ACCEPTED SOLUTION

@v-easonf-msft 

Thanks for the response.

2/26 is not shoiwng correct values in Excel and Power BI Desktop.

Found the work-around with CALENDARAUTO() DAX Function and created a relationship for the 2 date columns.

Now it is showing as expected in both sides.

Thanks once again for your support.

@GilbertQ ,@v-easonf-msft - Thank you.

 

View solution in original post

4 REPLIES 4
GilbertQ
Super User
Super User

Hi there

How are you getting the date 2/26 if you are using a datetime based on NOW() or UTCNOW() this is based in UTC and depending on where you are in the world will show you based on UTC.

If you had to exclude 2/26 are the values correct?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Uploaded the sample data with PBIX.

 

PBIX

 

Excel

Hi , @venal 

I open  the pbix your gave.

And it shows as below.

 

10.png

I don't quite understand the word  you mean  that "for 2/26 is not showing the right values in Desktop." .

Could your please tell me more details.


Best Regards,
Community Support Team _ Eason

@v-easonf-msft 

Thanks for the response.

2/26 is not shoiwng correct values in Excel and Power BI Desktop.

Found the work-around with CALENDARAUTO() DAX Function and created a relationship for the 2 date columns.

Now it is showing as expected in both sides.

Thanks once again for your support.

@GilbertQ ,@v-easonf-msft - Thank you.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.