Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Gin009
Contributor III
Contributor III

Hide label on qlik sense line chart

Hi Guys,

On the line chart, you can only choose to show all data points label or not show label. Can you hide the labels from January to September? Only shows 10-12 months, or is there a better extension? except vizlib.

Thanks!!

Gin009_0-1715829027428.png

 

Labels (3)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

again - this is my example.

I have field called MonthYear which is properly loaded as:

Date(Floor(MonthStart(MyDateFiled)),'MMMYY')

I use that as a primary dimension on my chart

I also use Dim1 as secondary dimension

I use 1 Measure:

Dual(
If(floor(YearMonth) < $(=Floor(Max(Total YearMonth,3))),' ',num(Sum(Expression1),'#,##0')),
Sum(Expression1)
)

I use Number formatting: "Measure Expression"

here is a result:

Lech_Miszkiewicz_0-1715842354877.png

 

do yo uneed anything else?

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

7 Replies
HirisH_V7
Master
Master

What exact output you want to see?

HirisH
“Aspire to Inspire before we Expire!”
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Gin009 ,

It depends how big your app is and how much workaround you are willing to put in without sacrificing performance. Below is actually quite straight forward.

In my example i just use dual() to change value representation to empty string. I dont know what will be criteria for you but you can come up with the statement which will be "true" for the dimension values where you would like to show labels.

Dual(If(Dim1<>'$(=MaxString(Dim1))','',num(Sum(Expression1),'#,##0')),Sum(Expression1)) 

Lech_Miszkiewicz_0-1715834508622.png

Lastly - my advice is to stay away from extensions unless you are willing to do your work again when you upgrade Qlik Sense and your extension stops working for some reason. 

cheers

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Gin009
Contributor III
Contributor III
Author

Hi @HirisH_V7 

 The final output is like this:

Gin009_0-1715839862473.png

The latest three months display the label value!

Gin009
Contributor III
Contributor III
Author

Hi @Lech_Miszkiewicz 

 The final output is like this:

Gin009_1-1715841376456.png

 

The latest three months display the label value!

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

yeah - I know @Gin009 

So were you able to implement my solution with Dual()?

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

again - this is my example.

I have field called MonthYear which is properly loaded as:

Date(Floor(MonthStart(MyDateFiled)),'MMMYY')

I use that as a primary dimension on my chart

I also use Dim1 as secondary dimension

I use 1 Measure:

Dual(
If(floor(YearMonth) < $(=Floor(Max(Total YearMonth,3))),' ',num(Sum(Expression1),'#,##0')),
Sum(Expression1)
)

I use Number formatting: "Measure Expression"

here is a result:

Lech_Miszkiewicz_0-1715842354877.png

 

do yo uneed anything else?

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Gin009
Contributor III
Contributor III
Author

Thank you for your support. After studying for an afternoon, I finally figured out this formula. Hahahaha😁, it is exactly the final result I want.👍