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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Testsubjec
Regular Visitor

Filter Values for a Line Chart

Hi,

I'm new to Power BI, so apologies if this is a really simple question to answer. 

I've created a Line Chart to display number of API Requests by Year / Month.

Testsubjec_0-1620752747709.png

I'd like to add another series to the chart to show number of failed requests but I'm struggling to understand how to do this. I have a HttpStatusCode field, in short count the number of Id's whereby the HttpStatusCode <> 200.

Again, apologies if this sounds very simple.

 

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @Testsubjec ,

 

you can do that with a measure.

Try the following:

Status not 200 = CALCULATE( SUM(myTable[API Requests]), mytable[HttpStatusCode] <> 200)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Testsubjec ,

Just as selimovd said ,try  the below:

Status not 200 = CALCULATE( SUM(myTable[API Requests]), mytable[HttpStatusCode] <> 200)

Or (if API Requests is Access log)

Status not 200 = CALCULATE( distinctcount(myTable[API Requests]), mytable[HttpStatusCode] <> 200)
If your problem  has been solved, if so, please consider Accept a correct reply as the solution to help others find it.

If still not work ,could you pls share your pbix file,remember to remove confident data.

 

Best Regards

Lucien

selimovd
Super User
Super User

Hey @Testsubjec ,

 

you can do that with a measure.

Try the following:

Status not 200 = CALCULATE( SUM(myTable[API Requests]), mytable[HttpStatusCode] <> 200)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.