Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
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.
Solved! Go to Solution.
Hey @Testsubjec ,
you can do that with a measure.
Try the following:
Status not 200 = CALCULATE( SUM(myTable[API Requests]), mytable[HttpStatusCode] <> 200)
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 still not work ,could you pls share your pbix file,remember to remove confident data.
Best Regards
Lucien
Hey @Testsubjec ,
you can do that with a measure.
Try the following:
Status not 200 = CALCULATE( SUM(myTable[API Requests]), mytable[HttpStatusCode] <> 200)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 78 | |
| 66 | |
| 65 |