Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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,

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community 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]
)

count.png

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.

View solution in original post

1 REPLY 1
v-yingjl
Community Support
Community 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]
)

count.png

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.