14 Replies Latest reply on Jul 22, 2018 7:00 PM by Zhouyi Zhang

# Minimum value >0

Hello,

I want to add Maximum, Median, and Minimum values to my viz for a measure. But I need a more meaningful minimum value rather than a zero. Do you have any suggestions? I have attached a sample workbook.

Thank you.

• ###### 1. Re: Minimum value >0

Hi Lori, first of all, in the Calculation1 calculated field you're mixing a string result like "Sales" with the function INT(). Perhaps you tried to use the measure [Sales]

The other thing is determine what are you expecting to obtain, if you have a set of data like the measure [Sales], if you use the aggregations like MAX(), MIN(), MEDIAN(), etc you are gonna obtain what is expected, the max, the min and the median..

Please give us more detail of what are you expecting obtein.

Robertino

• ###### 2. Re: Minimum value >0

Thank you, Robertino. What I am expecting to obtain is very simple. I want to show the max, the min, and the median sales values (apart from Summary). However, I want to show the min Sales higher than zero.

• ###### 3. Re: Minimum value >0

Perfect, trying insteed,

Calculatin1:

MIN(IF [Sales]>0 THEN [Sales] END)

Robertino

1 of 1 people found this helpful

• ###### 5. Re: Minimum value >0

Hi, Lori

Hope this helps

ZZ

1 of 2 people found this helpful
• ###### 6. Re: Minimum value >0

Thank you, Robertino. Actually, when I change the data format for standard "Sales" in the Super Store data, it gives me the same value as your calculation. Your calculation is not yielding higher than zero for a whole number. They are both giving the same result of \$0.44. Let me know if I should do something different. Thank you, again.

• ###### 7. Re: Minimum value >0

Thank you, Zhouyi. Please read my response to Robertino. Maybe I should go with a decimal value to avoid a zero value, although it creates inconsistency on my dashboard

• ###### 8. Re: Minimum value >0

Hi, Lori

So you actually need a min where the sales >1 as shown below?

ZZ

• ###### 9. Re: Minimum value >0

Thank you, Zhouyi. I need a whole number, not a decimal. I need a 1 instead of 1.044. I think we need to format the number (any decimal) to round up. If the min sales is 0.044, I need to show it as 1 (not 0).

• ###### 10. Re: Minimum value >0

Hi Lori,

Try wrapping the entire statement into a if then..

IF { FIXED : MIN(IF [Sales] > 0 then [Sales] END} <0 then 1 else [Sales] END

• ###### 11. Re: Minimum value >0

Hi, Lori

thanks for your confirm, and please see my updates below, with the calculation as my 1st solution, but use ceiling() to show the nearest number upwards.

Hope this helps

ZZ

1 of 1 people found this helpful
• ###### 12. Re: Minimum value >0

Thank you very much, Zhouyi. I changed the data type to currency. I now have \$1 for the min sales. :-)

• ###### 13. Re: Minimum value >0

Thanks, Peter. I get an error message for this calculation. Do you have any suggestions?

• ###### 14. Re: Minimum value >0

Cool

ZZ