cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sea_and_Anne Regular Visitor
Regular Visitor

Top 10 with filter

Hello all,

I have one table with the Machine name , the number of Alarms and the alarm nature. I want to create a simple graph with the top 10 of the machines with the hightest number of alarms.

But some have in name the word "error" , so i want to filter in order to show only the machines that don't contain this word.
So, i have created the top 10 tab. But isn't filter the name...do you know the reason?

 

NewTable = Calculate(TOPN(10,SUMMARIZE(SampleTable,SampleTable[Machine],"TotalAlarms",SUM(SampleTable[Alarms]) )); SampleTable[Machine] <> "% error % ")

 

 

 

MachineAlarmsNature
A14a
A14s
A14f
A14g
B13a
B error13g
D12r
E11t
F error10h
G6w
H5q
I error5a
J4g
K3h
L2t

 

 

 

Thanks in advance for your help

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-yulgu-msft
Microsoft

Re: Top 10 with filter

Hi, @Sea_and_Anne

 

You can also achieve that in DAX, please refer to the below formula:

 

NewTable = TOPN(10,SUMMARIZE(FILTER(SampleTable,FIND("error",SampleTable[Machine],1,0)=0),SampleTable[Machine],"TotalAlarms",SUM(SampleTable[Alarms]) ))

1.PNG

 

Best regards,
Yuliana Gu

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

View solution in original post

2 REPLIES 2
Highlighted
mridul Member
Member

Re: Top 10 with filter

@Sea_and_Anne : You can remove rows with Machine having "Error" word in Query Editor. Please screen shot. 

                               Since you need only Machine and Alarm , remove Nature column . you will get the result.

 

cmp.png

                                

Microsoft v-yulgu-msft
Microsoft

Re: Top 10 with filter

Hi, @Sea_and_Anne

 

You can also achieve that in DAX, please refer to the below formula:

 

NewTable = TOPN(10,SUMMARIZE(FILTER(SampleTable,FIND("error",SampleTable[Machine],1,0)=0),SampleTable[Machine],"TotalAlarms",SUM(SampleTable[Alarms]) ))

1.PNG

 

Best regards,
Yuliana Gu

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

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

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