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
Anonymous
Not applicable

sameperiod last year and date slicer

Hi I am using bar graph comparing this year's sales and last year's sales. 

My lastyear sales measure DAX is 

Total Sales LY = Calculate(SUM(AR_InvoiceHistoryDetail[Total Sales]),SAMEPERIODLASTYEAR('Master Date'[Date]))

When my bar graph is on "year" level, it doesn't show the previous year's sales. 

But when I drill down to either "quarter" level or "month" level, it shows the previous year's sales. 

Could you help with why on "year" level, it doesn't show the previous year data? 


previous year not showing.PNGquarter showing.PNGmonth showing.PNG

4 REPLIES 4
Anonymous
Not applicable

Do you have a dedicated date/calendar table?  If so, is it marked as a Date table?

Anonymous
Not applicable

Hi Nick, 

Yes, I have a dedicated date/calendar table ('Master Date' [date] in the code). 

Anonymous
Not applicable

can you post a sample file? onedrive works well

Anonymous
Not applicable

@Anonymous Do you have email address that I can send the onedrive link to?  

Or you can try this: https://uofstthomasmn-my.sharepoint.com/:u:/r/personal/kang1873_stthomas_edu/Documents/sample.pbix?csf=1&e=C9Breo

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.