Former Member

### Max of count in webi report

Hi,

I have data like this

Column

A

A

A

B

B

B

B

B

C

C

D

I need the result as B. Where it is counting and giving the maximum Value dimesion as the result.

10|10000 characters needed characters exceeded

• Jan 10, 2018 at 01:47 PM

create variable Show/Hide=If(Count([Column];All) In ([Column])=Max(Count([Column];All) In ([Column]))) Then "Show" Else "Hide"

Apply the filter on Show/Hide variable where value equal to Show to get the max value.

10|10000 characters needed characters exceeded
• Former Member
Jan 11, 2018 at 07:50 AM

Hi Amit,

I created variable Top =Max(Count([column];All) ForEach ([column)). I am getting the count as 5 of the highest number which is correct. Can you please help get B instead of count as 5

10|10000 characters needed characters exceeded
• AMIT KUMAR Former Member

can you share your table screenshot.add the variable and don't include in the filter.After that check if values are populating correctly or not.

• Former Member
Jan 11, 2018 at 11:04 AM

12.png

I have attached screenshot of the requirement

10|10000 characters needed characters exceeded
• Former Member
Jan 11, 2018 at 11:20 AM

everywhere its showing as Show only

10|10000 characters needed characters exceeded
• follow these steps.Create Show/Hide variable

=If(RunningCount([Country];([Country]))=Max(RunningCount([Country];([Country]))) In ([Region])) Then 1 Else 0

After that apply filter on Show/Hide and where equal to 1.

• Jan 11, 2018 at 11:30 AM

=If(RunningCount([Country];([Country]))=Max(RunningCount([Country];([Country]))) In ([Region])) Then 1 Else 0

After that apply filter on Show/Hide and where equal to 1.

10|10000 characters needed characters exceeded
• Former Member

Hi Amit,

Thanks

Shamsolution.png

solution.png (22.8 kB)
• Former Member
Jan 11, 2018 at 12:16 PM

Hi Amit,

Can you check the variable is this correct formula

=If(RunningCount([Country];([Country]))=Max(RunningCount([Country];([Country]))) In ([Region])) Then 1 Else 0

10|10000 characters needed characters exceeded
• yes it's correct.what is the issue?

• Former Member
Jan 12, 2018 at 10:47 AM

Hi Amit,

Thank you very much for the solution. I changed minor reset condition and it worked.

=If(RunningCount([Country];([Country];[Region]))=Max(RunningCount([Country];([Country];[Region]))) In ([Region])) Then 1 Else 0

Thanks once again

10|10000 characters needed characters exceeded
• Former Member
Jan 16, 2018 at 07:20 AM

Hi Amit

I apllied this formula:

=NoFilter(RunningSum([Amount];([[Country]];[Region])))

and used filter condition in table where it is 1

=If(RunningCount([Country];([Country];[Region]))=Max(RunningCount([Country];([Country];[Region]))) In ([Region])) Then 1 Else 0

Data is coming correct. But when i put report filter as YEAR its not working because of Nofilter.

Can you help me on this.

Thanks

Sham

10|10000 characters needed characters exceeded
• Former Member

Hi Amit

Thanks

1.png (17.2 kB)
• Former Member
Jan 17, 2018 at 03:46 PM

Hi ,

Thanks

Sham

10|10000 characters needed characters exceeded
• Former Member
Jan 15, 2018 at 04:22 PM

Hi Amit,