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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PeterStuhr
Helper V
Helper V

Show Daily Sales Last 4 weeks, ignore Year

Hi all,

 

I have a Calendar table, and a Sales Table connected by Date.

 

On a bar chart, I am showing Sales per day for last 4 weeks. I have Weeknum as Legend, Date as Axis and Sales as values.

 

However, when I use "Year" filter for 2021, it only shows for 2021, which makes sense.

 

Then I tried to do a measure: 

 

Sales Full = CALCULATE(SUM('Sales'[Sales EUR]),ALL(DimCalendar[Year]))
 
However, still shows for 2021, when I filter for Year = 2021.
 
Should't it ignore that?
 
Thanks!
2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @PeterStuhr ,

 

I created a simple demo and didn't meet such situation.

Measure = CALCULATE(SUM('Table'[value]),ALL('Table (2)'[year]))

1.PNG

2.PNG

3.PNG

Can you show more details or share the pbix if you don't have any Confidential Information?

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@PeterStuhr , When you use all and you have selected a year, All data will sum up to that year.

refer this video, it has been explained for months

https://www.youtube.com/watch?v=duMSovyosXE

 

As of now, the relative date slicer does not support the date. These case can be handled better with an independent date table

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors