Forum Discussion
line chart with dates and missing data
Hi v-jingzhang
An additional measure is not the solution because the original table does not have a "continuous" value for dates, so in the summarization some dates would miss for sure.
Since that a table with continuous values for all customers will be massive and not optimized, can I link a "table" to a stored procedure that gets data from filters that I will send like customerid and min/max dates selected from a range? With that, from the database I can recreate a continuous time series.
Hi ms92ita
To have a continuous date series, you can add a Date table. A simple method is to use DAX function Calendar. Then build a relationship between Date table and Fact table on Date column. Use Date table's Date column on X-axis of the line chart. This could make the X-axis have all continuous dates. And on the dates that are missing in Fact table, the measures with "+ 0" will return 0.
The following articles explain why you need a Date table and how to create a Date table with DAX:
Do You Need a Date Dimension? - RADACAD
Creating a simple date table in DAX - SQLBI
Creating a simpler and chart-friendly Date table in Power BI - SQLBI
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.