cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
maint_corlet Frequent Visitor
Frequent 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

Accepted Solutions
maint_corlet Frequent Visitor
Frequent Visitor

Re: how to count occurence of error code for each job?

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

How to count the occurrences of each code for each category.

 

 
 
 

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

Microsoft v-jiascu-msft
Microsoft

Re: how to count occurence of error code for each job?

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.
maint_corlet Frequent Visitor
Frequent Visitor

Re: how to count occurence of error code for each job?

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

Microsoft v-jiascu-msft
Microsoft

Re: how to count occurence of error code for each job?

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.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors