Skip to content

mvcount() can't count single value columns #848

@ronja-ui

Description

@ronja-ui

Describe the bug

mvcount() can currently count only multivalue columns.

Expected behavior

It should be able to count also columns that has only a single value in it.

How to reproduce

This example works as expected:

| makeresults
| eval x=mvappend("string", "3", "string")
| eval count=mvcount(x)

This however doesn't even if it should return 1 for each row and nothing for the null value:

| makeresults count=4
| eval row=1
| accum row
| eval products=case(row==1,"Book",row==2,"3",row==3,"Magazine")
| eval count=mvcount(products)

Screenshots

Software version

pth_10 version: p47-v8
pth_03 version: 9.4.1

Desktop (please complete the following information if relevant):

  • OS:
  • Browser:
  • Version:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions