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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.