cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

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
Regular Visitor

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

Hi @rtolbert ,

 

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.

 

 

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 @rtolbert ,

 

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.

 

 

Community Support
Community Support

Hi @rtolbert ,

 

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.

Super User IV
Super User IV

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.

---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.

---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.

---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
secondImage

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

secondImage

Power BI Women

Join our monthly meetings and learning sessions.

secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors