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
Fiala
Helper II
Helper II

virtual table count values

Hellou, I need help with counting values in virtual tables.

I have created this:
table1 =
SUMMARIZECOLUMNS(
    'Agent list'[Date],
    'Agent list'[name],
    'Agent list'[User login],
    "Top 10 t-wait", [Top 10 t-wait]
)


It gives me the right results. But now I need count the occurences of values ("Agent list"[name]). So I have virtual table:

DateNameUser loginTop 10 t-wait
1.3.2021Johnjo12302:33:14
3.3.2021Johnjo12304:56:39
1.3.2021Markma45605:23:23
2.3.2021Markma45606:23:45
3.3.2021Markma45602:22:34
7.3.2021Adamad78902:45:45
7.3.2021Adamad78901:45:56

 

The results shout be like:
Name  Count

John    2

Mark   3

Adam  2

 

 

Can you help me please?

 

Thank you

3 REPLIES 3
Anonymous
Not applicable

@Fiala 

 

I understand you want a separate table with Name and Count. Once you've created the first table, table1, you can create a second one like this:

 

[Table2] =
SUMMARIZECOLUMNS(
    table1[Name],
    "Count",
        CALCULATE(
            COUNTROWS( table1 )
        )
)
Anonymous
Not applicable

Hello @Fiala ,
You can use a measure.
Total Count = Count('Table'[Name])
If it's not expected then please share the pbix file after removing the sensitive data.

Jihwan_Kim
Super User
Super User

Hi, @Fiala 

Please correct me if I wrongly understood your question.

I think you can just write like,

 

measure = countrow (table1)

 

Or, if it is OK with you, please share your sample pbix file, then I can try to understand more clearly.

 

Thank you.

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors