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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PowerBI123456
Post Partisan
Post Partisan

Dynamic Target Line

Hi - is there a way to add a target constant line to a line graph that is depedent on the category. I have 15 different categories which each have a different target goal. Is there a way to change that target constant line automatically when I switch categories?

3 REPLIES 3
amitchandak
Super User
Super User

@PowerBI123456 , Create a meausre like

 

Switch(True(),

Max(Table[Category]) ="Cat1" , 30,

Max(Table[Category]) ="Cat2" , 40,

// Add so on

)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak thank you! But it doesnt seem to be working. Could you provide a sample file please? Thanks so much!

Hi  @PowerBI123456 ,

 

Check the similar thread below:

https://community.powerbi.com/t5/Desktop/Dynamic-constant-line/td-p/597459

 

Best Regards,
Kelly

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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