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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
F_Reh
Helper IV
Helper IV

Making Line Constant Appear/Disappear

Good Morning,

 

I have implemented a Field Parameter for the Y-Axis for a particular Bar chart allowing the user to decide whether to show numerals or percentages. The issue is that I need a line constant - showing the percentage target - to appear only whenever the percentages option is selected. This line constant would be irelevant when the numerals option is selected (and thus hidden).

 

Kindly recommend if it is possible to solve this.

5 REPLIES 5
F_Reh
Helper IV
Helper IV

 

 

man, you have a comma at the end of the third line, you should remove it

F_Reh
Helper IV
Helper IV

Thanks @Gabry . So the Field Parameter is as follows:

 

Field_Parameters.jpg

 

I have now created a new Measure _Rate = 0.04 (i.e 4%) for the line constant. So where would I need to add this so that the 4% line constant will appear only and only when percentage option is selected ?

you have to add another column at that table

 

like this:

 

prmdnaz = {

("", nameof(first percentage measure),0, "Percentage"),

("", nameof(second percentage measure costant line),0, "Percentage"),
("", nameof(third absolute measure),0, "Absolute")

}

Then, in the slicer used to enable users to select which measure to insert into the table, you utilize the last created column. Therefore, when they select "Percentage," both measures will be added to the visualization.

Gabry
Super User
Super User

I think you can achive this by putting not a constant line in the format pane but by adding a measure that has always the same value and that act as a costant line. You can add this measure in the field parameter when the percentage is selected you'll have 2 measure in the chart, one with your values and one that is constant representing what you want.

 

I think this is an aceptable workaround, let me know what you think

bye

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors