Stat with "IF" expression

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny

Stat with "IF" expression

Postby BloMur » Thu Apr 14, 2022 11:34 pm

Hello
I need some help creating following stat:

IF(statX) = beetween 70% and 80% than display (Value1)
IF(statX) = beetween 81% and 90% than display (Value2)
etc..
BloMur
 
Posts: 45
Joined: Fri Nov 24, 2017 7:47 pm

Re: Stat with "IF" expression

Postby Flag_Hippo » Fri Apr 15, 2022 1:14 pm

You can define what's displayed for a statistic by setting the 'Format Type:' field for a statistic to 'Expression' and entering what you need - see this guide. If you need further assistance please give a specific example.
Flag_Hippo
Moderator
 
Posts: 12544
Joined: Tue Jan 31, 2012 7:50 am

Re: Stat with "IF" expression

Postby BloMur » Fri Apr 15, 2022 4:59 pm

I need something similar to this
https://www.pokertracker.com/forums/vie ... 61&t=94197

How to set range beetween two number useing this < > = operators ?
BloMur
 
Posts: 45
Joined: Fri Nov 24, 2017 7:47 pm

Re: Stat with "IF" expression

Postby Flag_Hippo » Sat Apr 16, 2022 6:38 am

You use 'BETWEEN' for that - see this post.
Flag_Hippo
Moderator
 
Posts: 12544
Joined: Tue Jan 31, 2012 7:50 am

Re: Stat with "IF" expression

Postby BloMur » Wed Apr 20, 2022 7:51 am

"BETWEEN" does not work when creating statistic
BloMur
 
Posts: 45
Joined: Fri Nov 24, 2017 7:47 pm

Re: Stat with "IF" expression

Postby BloMur » Wed Apr 20, 2022 8:04 am

image
Attachments
asd.png
BloMur
 
Posts: 45
Joined: Fri Nov 24, 2017 7:47 pm

Re: Stat with "IF" expression

Postby Flag_Hippo » Wed Apr 20, 2022 12:54 pm

That's not going to work if you are putting it directly in the 'Value Expression' field. You should be using the 'Format Type' field - see this post.
Flag_Hippo
Moderator
 
Posts: 12544
Joined: Tue Jan 31, 2012 7:50 am

Re: Stat with "IF" expression

Postby BloMur » Thu Apr 21, 2022 2:51 am

I used mentioned method but it still does not work
Attachments
asdoo.png
BloMur
 
Posts: 45
Joined: Fri Nov 24, 2017 7:47 pm

Re: Stat with "IF" expression

Postby Flag_Hippo » Thu Apr 21, 2022 4:42 am

I see what you mean now. Instead of using BETWEEN use <= and >= to get what you want. Also your expression will not work correctly with the word 'format' where it is so use this:

Code: Select all
if((hufaceos0004 / hufaceosopp0004) >= .9 and (hufaceos0004 / hufaceosopp0004) <= 1, '77', '')
Flag_Hippo
Moderator
 
Posts: 12544
Joined: Tue Jan 31, 2012 7:50 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 3 guests

cron