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
maint_corlet
Regular Visitor

how to count occurence of error code for each job?

 

Good morning  All,

 

I am very new to Power BI , and running with an issue. I am sure I will definitely get the solution to my issue here. 

Issue :

 

The below is a column I have:

Col idjob           col errcode

 

2311                        35

2315                        13 

2311                        35

2312                        13

2311                        18 

2313                        23

2312                        35

 

I need 

 

Col idjob          col errcode             occurence

2311                        18                            1

2311                        35                            2

2312                        13                            1

2312                        35                            1

2313                        23                            1

2315                        13                           1  

 

 

I want to count the occurrences of each kind of err_code for each id_job. 

 

Thanks a ton in advance.

 

Regards,

Nico

1 ACCEPTED SOLUTION

thank you Dale for your answer,
I will use this method, it's very simple.
I was looking for, for several hours ,a method with the dax, without success.
I think i don't have a good enough level for that.
regards
Nico

View solution in original post

4 REPLIES 4
v-jiascu-msft
Employee
Employee

Hi Nico,

 

It's easy to achieve in Power BI. Please check out the demo in the attachment.

how_to_count_occurence_of_error_code_for_each_job

 

Best Regards,

Dale

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

thank you Dale for your answer,
I will use this method, it's very simple.
I was looking for, for several hours ,a method with the dax, without success.
I think i don't have a good enough level for that.
regards
Nico

Hi Nico,

 

The DAX formula could be as follows. DAX formula responses to the context. We just need to make the first two fields right.

Amount = count(Col id_job)

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
maint_corlet
Regular Visitor

 

 
 
 

Good afternoon All,

 

I am very new to Power BI , and running with an issue. I am sure I will definitely get the solution to my issue here. 

Issue :

 

The below is a column I have

Col id_job   col err_code

 

2311                35

2312                13

2311                35

2315                 23

2313                12

2314                18

2311                 44

 

 

I need 

 

Col id_job   col err_code     occurence

 

2311                35                         2              

2311                44                         1

2312                13                         1

2313                12                         1

2314                 18                        1

 

2315                 23                         1

 

        

 

 

I want to count the occurrences of each err_code for each job, i don't know if it's possible

Thanks a ton in advance.

 

Regards,

Nico

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.