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
ManishShetty
Frequent Visitor

Sum of Sales in Line chart until the week selected in the Date slicer

Hi,

 

I'm creating a sales dashboard with visual cards and line chart based on the FiscalYearWeek selection in a dropdown. I'm having trouble with making the line chart work with the type of week slicer that I'm using. 

 

ManishShetty_0-1679601420021.png

 

I want to keep the slicer dropdown values in this format.

 

When I try to display the total sales in a linechart until the (last day of) selected week, it appears as a single dot for that specific week instead of summing the sales from the first day of the year to the week selected. 

ManishShetty_1-1679601689824.png

 

 

This is how I want it to function: weeknumber 5 is selected within the Week slicer. The line-chart should display the cumulative sum of sales until week 5.

 

 

I'm trying to avoid using hierarchy as it doesn't display the week chosen by the user correctly when there are multiple selections.

 

ManishShetty_0-1679601914603.png

 

Any suggestions as to how to make this work?

 

Thanks in advance!

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

I am not sure of how much i can help but i would like to try.  Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@ManishShetty , when you select one date/period and want to display more than that you need an independent date table for slicer

 

You can use date of Yearweek (yyyyww format)

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] <=_max))

 

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

 

 

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.