Forum Discussion
problem with line graph for continuous totals
- 1 year ago
Thank you to everyone who posted suggestions. I was able to determine that the issue that was causing the problem (gaps in lines) was due to using a weekmin date function (CALCULATE(MINX('Calendar','Calendar'[Date]),ALLEXCEPT('Calendar','Calendar'[Week Number]))) to graph my data on the x-axis. Power BI viewed this as a categorical value and gaps were created in my data as a result. When I changed the x-axis to continuous and instead used 'Date' from the Calendar table as the x-axis field the lines in the visual were presented without gaps over the correct timespan. I wasn't able to have the data presented weekly on the x-axis (it is presented monthly instead) but that is a small tradeoff I can live with.
Below is the result when the x-axis is continuous and Date is used from the calendar table:
To help you, two things are needed
1 - Please turn the graph into tables so we can see numbers
2 -
Please include, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.
Need help uploading data? click here
Want faster answers? click here
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
I'm working on trying to put together a sample file that I can post. In the meantime, I noticed that when I use a slicer that contains a column of names that are used in the legend field of the visual and I select a name, the line is continuous and works. When I select more than one name, the lines become broken.
Visual when one name is selected in the slicer:
Visual when more than one name is selected in the slicer: