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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
pedromq
Frequent Visitor

Count rows of a measuare

Hi, guys...

I made a measure to divide the users into clusters, working normally in the table view. However, I can't summarize this data in a table to know exactly how many clients are in each cluster.

I've tried SUMMARIZECOLUMNS, but when I apply date filter the data does not change. If anyone can help me, I'll be grateful.

Ok, first of all I have created the measure that the clusters is based.

Volume Medio = AVERAGE('1,0_Dados_Acumulado'[VOLUME])

Than, I created the cluster measure

Cluster = 
VAR Volume  = [Volume Medio]
RETURN
    IF(Volume=0;"F";
        IF(Volume<=2500;"E";
            IF(Volume<=5000;"D";
                IF(Volume<=10000;"C";
                    IF(Volume<=50000;"B";
                        IF(Volume>50000;"A";"WRONG")
                    )))))

So, I need to visualize exactly how many users are in each cluster with the date filter interfering in the calculation.

 Cluster    |      N
    A       |      9
  B | 25
C | 40   

 

1 ACCEPTED SOLUTION
Cmcmahan
Resident Rockstar
Resident Rockstar

Unfortunately, you can't use SUMMARIZE and a measure as your group by column.  It has to be a pre-existing column.

 

The biggest uknown for me is how you're splitting your original data.  If I just evaluated [Volume Medio] without any context or filters, it would give me the average of all your data.  Are you grouping it by another column, some sort of category?

 

If you had a separate table that just listed your groupings, you could put that into a small enumeration table and then add that to a visual with this measure:

ClusterCount = COUNTROWS(FILTER(SUMMARIZE('Table1', 'Table1'[Category], "Category", [Cluster]), [Category] = SELECTEDVALUE('enumTable'[Grade]) ))

Any more specificity depends on how your data is arranged and whether you can create a small table to iterate over or not.

 

View solution in original post

2 REPLIES 2
Cmcmahan
Resident Rockstar
Resident Rockstar

Unfortunately, you can't use SUMMARIZE and a measure as your group by column.  It has to be a pre-existing column.

 

The biggest uknown for me is how you're splitting your original data.  If I just evaluated [Volume Medio] without any context or filters, it would give me the average of all your data.  Are you grouping it by another column, some sort of category?

 

If you had a separate table that just listed your groupings, you could put that into a small enumeration table and then add that to a visual with this measure:

ClusterCount = COUNTROWS(FILTER(SUMMARIZE('Table1', 'Table1'[Category], "Category", [Cluster]), [Category] = SELECTEDVALUE('enumTable'[Grade]) ))

Any more specificity depends on how your data is arranged and whether you can create a small table to iterate over or not.

 

pedromq
Frequent Visitor

Anyone?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.