Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a list of Job Numbers and columns that determine whether a job meets any of 5 criteria (let's call them Criteria1-5)
I need to create a pie chart or even just a data card that shows what percentage of Job Numbers meet the selected criteria.
So, if I have 3 out of the 5 criteria slicers selected, what percentage of the total count of existing jobs meet this?
Example: there are 282 total jobs and 2 of them meet all 5 criteria. So when I have all 5 criteria slicers set to "Yes", I need something that shows me a value of "0.71%" and so on.
Solved! Go to Solution.
I have an idea... I hope this helps, press the next link
Hi @bhmiller89
To solve your answer...
1. Data Sample (In my case, the table is called "Table 1")
2. Create the next measures...
Total Jobs = CALCULATE(DISTINCTCOUNT(Table1[Job Number]);ALL(Table1))
Total Criteria = DISTINCTCOUNT(Table1[Job Number])
Percentage = DIVIDE([Total Criteria];[Total Jobs])
3. The results look like...
I hope this helps
Regards
BILASolution
Assuming you have the criteria in a table called Criteria (I have called them "A"-"E") that you use for the slicer, and assuming the jobs are ina table called Jobs with criteria Columns containing boolean values (TRUE or FALSE) named A through E, the below should do it. The Criteria table can have no relationship with the Jobs table, and if you have other slicers involved it could require changes to the formula.
Percentage = COUNTROWS(FILTER(Jobs, IF(CONTAINS(Criteria,Criteria[Criteria],"A"), Jobs[A], TRUE) && IF(CONTAINS(Criteria,Criteria[Criteria],"B"), Jobs[B], TRUE) && IF(CONTAINS(Criteria,Criteria[Criteria],"C"), Jobs[C], TRUE) && IF(CONTAINS(Criteria,Criteria[Criteria],"D"), Jobs[D], TRUE) && IF(CONTAINS(Criteria,Criteria[Criteria],"E"), Jobs[E], TRUE)))/COUNTROWS(ALL(Jobs))
I think I know the bigger issue.
the criteria are stored in two different tables based on where each data point is kept.
I think I need to create a calculated table to pull in the JOb numbers and each column with criteria. I've never done that before.
If that's the case, could you provide me some guidance?
the link is not working can you attach the solution ?
The solution link wont open and
@BILASolution wrote:
I have an idea... I hope this helps, press the next link
I have similar issue
Hi @bhmiller89,
I think you have mixed up the Criteria and the ActiveProject tables in your formula. The Criteria table needs to be separate from the ActiveProjects table and with no relationship with your ActiveProjects table, and is used for the slicer. Otherwise this wont work. With regards to some of the criteria being in different tables, the easiest way to resolve that is to create calculated columns that "pull in" the missing citeria to the ActiveProjects table.
I used your calculations:
Test%Total = COUNTROWS(FILTER(ActiveProjects, IF(CONTAINS(ActiveProjects, 'dpmgr vwJMWebJobSummary'[IsSOWHrs>300], "Yes"), ActiveProjects[Job Number], TRUE())&& IF(CONTAINS(ActiveProjects, 'dpmgr vwJMWebJobSummary'[IsLengthDays>180], "Yes"), ActiveProjects[Job Number], TRUE()) && IF(CONTAINS(ActiveProjects, 'dpmgr vwJMWebJobSummary'[IsActualEHR < $160], "Yes"), ActiveProjects[Job Number], TRUE()) && IF(CONTAINS(ActiveProjects, ActiveProjects[Is%HrsCompletion>75%], "Yes"), ActiveProjects[Job Number], TRUE()) && IF(CONTAINS(ActiveProjects, ActiveProjects[IsLastJR>60], "Yes"), ActiveProjects[Job Number], TRUE())))/COUNTROWS(ALL(ActiveProjects))
but I'm getting an error "Calculation error in measure.... Cannot convert value "2014-DLL-J27 (which is a job number), of type Text to type True/False"
I have them as columns in the Jobs Table as "Yes"/"No" Values
Job Number | Criteria 1| Critera 1...
This way???
Total Jobs = CALCULATE(DISTINCTCOUNT(Job[Job Number]);ALL(Job))
Total Criteria = CALCULATE(DISTINCTCOUNT(Job[Job Number]);Job[Value] = "Yes")
Precentage = DIVIDE([Total Criteria];[Total Jobs])
Best Regards
BILAsolution
not quite, I have columns written for each. Example: the column is titled "Criteria 1" and the values are either "Yes" or "No" based on an If/Then statement. I did it this way for each Criteria.
Job Number| Criteria 1| Criteria 2|Criteria 3| .......
_____________________________________________________
XXX-XXX| "Yes"| "No"| "Yes"......
User | Count |
---|---|
102 | |
91 | |
87 | |
79 | |
71 |
User | Count |
---|---|
113 | |
105 | |
101 | |
75 | |
64 |