This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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 ?
Solved! Go to Solution.
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
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
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
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 May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 49 | |
| 47 | |
| 41 | |
| 21 | |
| 19 |