Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
I have a line chart drawn with a Year on the X-axis and a Measure on the Y-axis.
Aditionally, I have a field in the legend which give me 2 lines one for each category in the legend field.
Now I want to be able to display 2 constant lines one for each category. When I use the Analytics pane, I am able to add only one field - Measure and so I am able to show just one constant line.
Is there a way to display 2 constant lines based on the legend field ?
Hi @Hoping
You can add multiple constants, just press "Add line" for every new line that you need.
pbix is attached.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
The contant line I would like to display is the current year value for each category (the column in the legend).
I want 2 lines one for each category.
Should I be creating 2 measures one for each category ?
Hi @Hoping
Technically - yes.
From an Efficient data visualization perspective, I don't recommend putting all this on 1 graph...
If I understood you correctly the result is 6 lines on the same graph ( 2 measures + 2 constants for every separate measure) it will be very challenging to read this kind of graph.
Maybe it will be better to create 2 separate graphs ...or to create the tooltip with the constants.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
That will be 4 lines - One line for each of the 2 categories plus 2 constant lines one for each category.
This is not just about the quantity of lines; having two lines with two constants is akin to telling two stories in one sentence. When comparing two trends or categories in a chart, introducing constants can create confusion for the reader. It requires additional cognitive effort to discern which constant corresponds to each measure, diverting the reader's mental resources from the primary task of comparing trends. Regardless, the decision is yours. Technically, the answer is yes—having separate measures for each constant, just like in the Power BI file I attached in my initial response.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
93 | |
58 | |
44 | |
35 | |
34 |