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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anton-G
Helper I
Helper I

Table with the number of times that an event has occurred

Has a database that receives hundreds of new entries each day.

Have some slices where I choose between which dates and locations I want to look at.

Want to create a table showing the time and number of times as a machine is in the list.

 

Simplified example of how the information may look:

Machine_1      0,5

Machine_2      0,5

Machine_1      0,5

Machine_3      3,0

Machine_3      1,0

 

The result I want:

Machine_3      4,0                       2

Machine_1      1,0                       2

Machine_2      0,5                       1

 

Have tried to add machine two times and make the 2nd a 'Count'

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anton-G,

Please create the following measures in your table.
1.PNG

Measure = COUNT(Table1[Machine])
Measure 2 = SUM(Table1[Value])

1.PNG

Regards,
Lydia

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

@Anton-G,

Please create the following measures in your table.
1.PNG

Measure = COUNT(Table1[Machine])
Measure 2 = SUM(Table1[Value])

1.PNG

Regards,
Lydia

If I create a new document that only contains the example, it works.

When I work against existing databases, I get the following error message:

“the function count takes an argument that evaluates to numbers or dates and cannot work with and cannot work with values of type String.'.”

Anonymous
Not applicable

@Anton-G,

Please use COUNTA() instead of COUNT().

Regards,
Lydia

If i use COUNTA is the result 1
If i use COUNTROWS I get the error message:
This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

Anonymous
Not applicable

@Anton-G,

Please check the following DAX.
1.PNG2.PNG

Regards,
Lydia

Use another column (to make the calculation against) in the database and then got it working.
Thank you for your help.

You could try this for the first measure by @Anonymous

Instead of COUNT use COUNTROWS(YourTable)

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors