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
andhiii079845
Solution Sage
Solution Sage

Bug constant line settings disappear when measure return blank()

Hi,

perhaps i find a Bug in Power BI Desktop:

I have following measure:

Measure 2 =
IF(HASONEFILTER('Table'[year]),10,BLANK())
 
I use it in my bar chart as a constant line:
andhiii079845_0-1677842183927.pngandhiii079845_3-1677842466325.png

If a year is selected, i see the settings of the line in the bar chart:

andhiii079845_1-1677842364758.png

If no year is selected, no setting are visiable in the bar chart:

andhiii079845_2-1677842428002.png

 





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

Proud to be a Super User!




1 ACCEPTED SOLUTION

This works

IF(HASONEVALUE('Table'[year]),10,"")

View solution in original post

9 REPLIES 9
andhiii079845
Solution Sage
Solution Sage

This will work, but i want blank () 😉





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

Proud to be a Super User!




Constantline, as I understand,accepts only numeric values. so really wonder whether that would be possible

But in my case I like it. Only show the line if there is a value. Zero will be wrong.





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

Proud to be a Super User!




This works

IF(HASONEVALUE('Table'[year]),10,"")

This works

IF(HASONEVALUE('Table'[year]),10,"")

Everytime very interesting. "" instead of BLANK() work! Big thanks!





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

Proud to be a Super User!




Padycosmos
Solution Sage
Solution Sage

Can you please try the following

Measure 2 =
IF(HASONEVALUE('Table'[year]),10,BLANK()

Thank you for your reply. I test it, same problem.





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

Proud to be a Super User!




The other option I can think of is IF(HASONEVALUE('Table'[year]),10,0)

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