Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Constant line value that changes with Slicer selection

I am trying to create a constant line that changes value based on the Slicer selection, I have a Switch statement that assigns the value and the line value appears correctly on the line tooltip but the line isn't displaying at the correct value or moving at all.

My Switch statement is:

 

 

 

 

Flat Line = 
SWITCH(
SELECTEDVALUE('Table'[Column]),
"P" , 85,
"G", 80,
"U", 80
)

 

 

 

 

 

Line Behavior:

image.pngimage.png

9 REPLIES 9
Anonymous
Not applicable

I see that now, Is it possible to assign the Y-axis values for the line?

Hi @Anonymous ,

 

Try the feature:

jj11.PNG

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

Toggling that option changes which side the Y-axis for the column data is on (left to right), then the line values just changes to whichever side the column data isn't on, and I don't see any options for changing the line Y-axis under that menu.

Hi @Anonymous ,

 

ccc9.PNG

When the range of line and Y-axis values are similar, they will be merged into a coordinate system. This is automatically controlled by the software, and we have no way to change it.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

The left Y axis is for labeling Columns values,

ii5.PNG

and the right Y axis is for labeling Line values

ii6.PNG

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

That's really odd, do you have Flat line in the Line values part of your column and line chart? That's where it should be.

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I do.

 

image.png

Oh, I see what's going on, your line and axis is changing. (the Y axis on the right). Therefore, you cannot judge the position of the line by the axis and left, you have to judge by the y axis of the right.

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Oh, I see what is going on, your line y-axis is changing. (the right-hand y-axis). So, you can't judge the position of the line by the left y axis, you have to judge it by the right-hand y axis.

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.