Forum Discussion
Power Bi Filters
- Anonymous7 years ago
You're welcome. Thinking a bit more about this. The solution will work, but I don't think it's the most elegant way.
You're talking about expected statuses that don't actually exist. But actually, you know what the statuses will be, right?
You can add another table, with the list of expected statuses.
Then create a Relationship between this table and your current table. That relationship will cause the existing table to be filtered by the new.
Create the following visual to show all statuses:
1. Table visual with the Status from the new table, and the Count of Status measure.
2. Right-click the Status field, and click "Show items with no data".
Each row in the table is a status - since the new table filters the existing, the existing table is limited to only the rows with that status.
Hi for clarity, I have included the dataset. What I am currently attempting is for each 'Teams' display the total Test Result for each selection based on the Teams column.
I.e Content Support would have their own analytic view which comprise of 4 possible status's Pass, Failed, In Progress and Not Started. If any of the status's do not exist I wish to display a 0 on the score card.
Also, the test result status's are added and then dispalyed for each team.
Please advise how I would construct this query. Thanks.
shere100 - For clarification, is this what you're looking for?:
1. A single scorecard that will count how many times each status appears for a given team?
-If so, that will require the measure to count the # of rows, filtered by Team(s) and Status(es)
- shere1007 years agoHelper II
Hi, that's correct but when the filter does not exist for the given team at that time to then display a 0.
For example I have a score card for each status within each 'Test Status' i.e Not Started, Failed,Pased and In Progress.
If there is no data for 'Pass' I would like a 0 to display.
- Anonymous7 years agoNot applicable
shere100 -
I think the following measure should work. Just replace 'YourTableName' with the name of the table.
Count Of Status =
var a = COUNTROWS('YourTableName')
return IF(ISBLANK(a), 0, a)
- shere1007 years agoHelper II
Hi, thanks for the response.
How do I include a filter for say if a filter type did not exist currently buit with data movements it will i.e there is no pass in the test results but when data changes and there are I wish for them to be displayed on a score card.
How do I do this? I've checked the filter types and I cannot add a custom filter.
- Anonymous7 years agoNot applicable
shere100 -
Start with 1 scorecard.
Add the following Measure to the Fields area of the scorecard:
Count Of Status = var a = COUNTROWS('YourTableName') return IF(ISBLANK(a), 0, a)Add [Test Result] to the Visual Level Filters area for the scorecard, and use Advanced Filtering, like this:
You'll want to use the Title, instead of the Category label:
Finally, copy and paste the card, and change the Advanced filter and the Title text for each card.
Cheers!
Nathan
- shere1007 years agoHelper II
Many thanks Nathan.
- Anonymous7 years agoNot applicable
You're welcome. Thinking a bit more about this. The solution will work, but I don't think it's the most elegant way.
You're talking about expected statuses that don't actually exist. But actually, you know what the statuses will be, right?
You can add another table, with the list of expected statuses.
Then create a Relationship between this table and your current table. That relationship will cause the existing table to be filtered by the new.
Create the following visual to show all statuses:
1. Table visual with the Status from the new table, and the Count of Status measure.
2. Right-click the Status field, and click "Show items with no data".
Each row in the table is a status - since the new table filters the existing, the existing table is limited to only the rows with that status.
- shere1007 years agoHelper II
Perfect, thanks for the awesome advice.