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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Constant line based on input

I have a line chart that i want to display a constant line on based on user input, so i added a what if parameter. the problem is that my minimum and maximum values change depending on the columns selected from a slicer. i made 2 measures, minimum and maximum values, which take the 'value' column from my Unpivoted table that i made to be able to choose between different columns. the minimum and maximum measures work perfectly how i want depending on the column i have selected, but they dont work in the what if parameter, the what if parameter has this query : 

Const Line =
GENERATESERIES(
    [Min_Ref_Line],
    [Max_Ref_Line],
    1
)
it is giving me the minimum and maximum of all my values in the Unpivoted table, not based on my slicer selection
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

You cannot make a table to be dependent on measures since measures are dependent on context, when you select the values from a slicer that value is not moved into the table since tables required a row context and in that case will pick up all the values from you original table instead of the values selected in the slicer.

 

What is the result you want to have on your constant? Can you give some more context?


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Anonymous ,

 

You cannot make a table to be dependent on measures since measures are dependent on context, when you select the values from a slicer that value is not moved into the table since tables required a row context and in that case will pick up all the values from you original table instead of the values selected in the slicer.

 

What is the result you want to have on your constant? Can you give some more context?


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.