Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi Experts
I am trying not to plot future values as into my line graph as i get zero on the line plot as i have no data for those dates. When i use the following DAX
Solved! Go to Solution.
Hi @Anonymous
Download sample PBIX with data and charts
If you could supply some data that would help understand what you are working with.
You say you have no data for March onwards. Do you mean you have rows with dates for March but no sales values in those rows? Or you actually have no rows for any date after the end of Feb?
To plot Sales up to the current month use this measure
Sales Up to This Month = CALCULATE(SUM(Table1[Sales]), FILTER('Table1', MONTH('Table1'[Date]) <= MONTH(TODAY())))
To plot data up to the previous month use this measure
Sales Up to Last Month = CALCULATE(SUM(Table1[Sales]), FILTER('Table1', MONTH('Table1'[Date]) <= MONTH(TODAY()) - 1 ))
Regards
Phi
Proud to be a Super User!
Hi @Anonymous
Download sample PBIX with data and charts
If you could supply some data that would help understand what you are working with.
You say you have no data for March onwards. Do you mean you have rows with dates for March but no sales values in those rows? Or you actually have no rows for any date after the end of Feb?
To plot Sales up to the current month use this measure
Sales Up to This Month = CALCULATE(SUM(Table1[Sales]), FILTER('Table1', MONTH('Table1'[Date]) <= MONTH(TODAY())))
To plot data up to the previous month use this measure
Sales Up to Last Month = CALCULATE(SUM(Table1[Sales]), FILTER('Table1', MONTH('Table1'[Date]) <= MONTH(TODAY()) - 1 ))
Regards
Phi
Proud to be a Super User!
Hi Phil
See test file.....link... I just want to plot the two datapoint for 2021, as i only have data for two month 2020 is a correct plot.
the measure needs tweeking..
https://www.dropbox.com/s/59xfqa9nzedh1q0/sample.pbix?dl=0
Kindly just post a new measure..
not a new file...
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.