6 Replies Latest reply on Jan 7, 2019 6:50 AM by Joshua Preston

# min/max value labels on line chart

Hello. I used the min/max labels but on some lines I have a bunch of zeros for monthly values. So it shows all the zeroes. How can I have it just show one of them?

• ###### 1. Re: min/max value labels on line chart

There is no straightforward way of achieving this. A possible hack would be to create a calculation like below and then use it for label. Create 2 calculations, one for min and one for max.

if isnull(

If ([measure] = {Fixed dim1,dim2:Min([measure])}) then [measure] End

) then null

elseif ([month] = {Fixed dim1,dim2:Min([month])} then [measure]

End

This will return min value for the earliest month only. So zero will show for the earliest month only.

1 of 1 people found this helpful
• ###### 2. Re: min/max value labels on line chart

Hi Alex,

Were you able to find a solution for this problem. Just following up.

Thanks!

• ###### 3. Re: min/max value labels on line chart

Hi Anisha, may I ask what those formulas are doing? Is there not a simpler solution haha?

• ###### 4. Re: min/max value labels on line chart

I don't quite understand the logic, nor do I understand how to apply to what I have. Here is a picture.

• ###### 5. Re: min/max value labels on line chart

In my earlier response, I shared a sample calculation. You need to create 2 calculations based on that - one for capturing minimum value and one for maximum value for the earliest month so that you don't get a repeat of zero in labels.

Once the calculations are saved, they need to be dragged on the 'Text' marks card and used as labels.

Let me know if that works!

1 of 1 people found this helpful
• ###### 6. Re: min/max value labels on line chart

Hey Anisha - thanks for sharing this calc. I have the same issue, so I applied the calc and it gets me part of the way there. It does solve for removing the duplicate min values, but the correct single min value only appears if the year is the first in the series. It doesn't capture the min value if the year is in the middle of the time series. Any thoughts on an LOD for this situation? thank you!

workbook attached.