Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Problem counting the top 5 URLs more visited

Good afternoon,

 

I have a column with the different URLs in the following format: 

 

/productpage;

/page;

/page;

/start

/home;

/productpage;

/blog

/blog

/blog

/page;

/page2;

 

 

I want to create a graph/table whatever that shows me the top 5. In some cases, the cells are empty (i.e, no page).

 

I tried this, but it is not doing it properly (chatdaten is the name of the table, and Im Bereich is the name of the "Url". It is counting more URLs than I actually have, and when I apply the top N, it does not take into account the empty cells, so the total amount is lower than the actual one.

 

Count URL =

COUNTX(FILTER(ALL('stag_zit chat_daten'),[Im_Bereich]=EARLIER('stag_zit chat_daten'[Im_Bereich])),[Im_Bereich])

 

What am I doing wrong? How should I do? Thx,

 

  • Hi Anonymous ,

    Based on your description, you can create this measure and set top 5 for the visual:

    Count url =
    COUNTX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[url column]
                IN DISTINCT ( 'Table'[url column] )
                    && 'Table'[url column] <> BLANK ()
        ),
        [url column]
    )
    

    Attached a sample file in the below, hopes to help you.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-yingjl's avatar
    v-yingjl
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

    Based on your description, you can create this measure and set top 5 for the visual:

    Count url =
    COUNTX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[url column]
                IN DISTINCT ( 'Table'[url column] )
                    && 'Table'[url column] <> BLANK ()
        ),
        [url column]
    )
    

    Attached a sample file in the below, hopes to help you.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.