Forum Discussion

martylin's avatar
martylin
New Member
8 years ago
Solved

range measure

Data table look like this

 

account   amount   date

axxxx        123         2017/1/1

axxxx        323         2018/2/1

bxxx         133         201712/1

bxxx         432         2018/2/3

cxxx         3333        2019/1/1   

cxxx         3333        2019/1/1   

cxxx         3333        2019/1/1   

 

I like to display like this one, 

 

range       count

0-2              2

3-4              1

5↑                0

 

how to do it?   

  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi martylin,

     

    You can create a calculate column to stored range tag, then use it to create table visual with 'account column' as summary mode count.

    Category =
    VAR _count =
        COUNTAX (
            FILTER ( ALL ( table ), [account] = EARLIER ( table[account] ) ),
            [account]
        )
    RETURN
        IF (
            _count > 0,
            IF ( _count <= 2, "0-2", IF ( _count <= 4, "3-4", IF ( _count >= 5, "5↑" ) ) )
        )
    

     

    Regards,

    Xiaoxin Sheng

2 Replies

  • Hi martylin,

     

    Your question is not to explicit about what you want to achieve.

     

    How do you determine the range for the information  you gave?

     

    Regards,

    MFelix

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi martylin,

     

    You can create a calculate column to stored range tag, then use it to create table visual with 'account column' as summary mode count.

    Category =
    VAR _count =
        COUNTAX (
            FILTER ( ALL ( table ), [account] = EARLIER ( table[account] ) ),
            [account]
        )
    RETURN
        IF (
            _count > 0,
            IF ( _count <= 2, "0-2", IF ( _count <= 4, "3-4", IF ( _count >= 5, "5↑" ) ) )
        )
    

     

    Regards,

    Xiaoxin Sheng