Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello,
I have a line graph where the X-axis contains both year and type (in a hierarchical format), and the Y-axis represents values from a measure. The legend is used for the location.
For each year and type, I have 5 different values, corresponding to 5 different locations for each type. While the graph works, it's becoming hard to interpret due to the complexity, as there are 2 types, each with 5 values, which results in a zigzag pattern that makes it difficult to compare trends over the years.
My expectation: I want the X-axis to only show the years, and then I want to display lines to compare different types. My idea is to have solid lines for one type (e.g., type-12) and dashed lines for another type (e.g., type-3). For example, loc-1 could be represented by a blue color. The solid blue line would represent type-12 for loc-1, and the dashed blue line would represent type-3 for loc-1.
In the legend, I want to display only the 5 location names (not 10) because the line color is the same for each location, and only the line style (solid or dashed) changes based on the type.
Does this approach make sense? How can I achieve this (if possible)? Or if anyone has a better suggestion to handle this situation, I’d love to hear.
Please find the Power BI file here
Thank you
Solved! Go to Solution.
Hi @0Experience
are you looking for an output similar to this ?
If this is what you are looking for, how about creating a summary table and manually changing the line color and style for different combinations? You can include the legend as an image, but the limitation is that the legend will not be interactive.
I did color and line types change for one location as an example and attached the PBIX file for your reference.
Hi @0Experience
are you looking for an output similar to this ?
If this is what you are looking for, how about creating a summary table and manually changing the line color and style for different combinations? You can include the legend as an image, but the limitation is that the legend will not be interactive.
I did color and line types change for one location as an example and attached the PBIX file for your reference.
Hi @0Experience - Standard Power BI Line chart does not support dashed/solid differentiation.But custom visuals like Deneb (Vega-Lite) or Charticulator let you define line styles (strokeDash).
If you’re okay with custom visuals → use Deneb (best control, exact solid/dashed requirement).
If you prefer only native visuals → use Small multiples (keeps years on X-axis, legend by location, one panel per type).
Hope the above suggestion helps.
Proud to be a Super User! | |
Hello @rajendraongole1
Thanks for your response. However, unfortunately I can not use Small multiples because it is not gonna work for (trend analysis), and can not use external add-ons.
Thanks again.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 38 | |
| 31 | |
| 27 | |
| 26 |