Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I need to plot a column chart with rolling sum of sales. For everymonth it should show the rollingsum of sales till the end of the month. If there is no sales on a particular day, it should show the rolling sum till the previuos day.
I'm using the below DAX to find the rolling sum.
RollingSum =
CALCULATE(
SUM (Sales [sales],
FILTER(
ALLSELECTED('Date'),
'Date'[Date] <= MAX('Date'[Date])))
This is working fine. But when I apply the slicer (sales person id) it is not showing the date on the x axis if there is no sales transaction on that particular day as given below.
day wise sales chart is given below.
Please help me to have all the days displayed on the above chart evenif there is no transaction happend on those days.
@Anonymous , Try using
Create a Date Table: Ensure you have a date table that includes all the dates in the range you are interested in. This table should not have any missing dates.
Create a Relationship: Make sure there is a relationship between your Sales table and the Date table.
Modify the DAX for Rolling Sum: Adjust your DAX formula to use the Date table.
RollingSum =
CALCULATE(
SUM(Sales[sales]),
FILTER(
ALLSELECTED('Date'),
'Date'[Date] <= MAX('Date'[Date])
)
)
Proud to be a Super User! |
|
I did the same way. Created a date table and related to sales date in the sales table. Still I'm not able to plot the rolling total if there is no sales on a particular day.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
61 | |
61 | |
55 | |
38 | |
27 |
User | Count |
---|---|
85 | |
60 | |
45 | |
41 | |
39 |