Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
New to PowerBI. I'm looking to create a measure that can take 2 counts and display a percentage.
I first want to count the number of rows in my table where each column below is equal 100.
[Team Complete (%)]
[Ph0]
[Phase 1-2],
[Ph 3],
[Ph 4a],
[Ph 4b-5],
[Ph 6], [
Ph 6-1]
I then want to take that count and divide it by the count of rows of the column below that are equal to 100.
[Team Complete %]
I'm not sure if its possible to put several arguments in a count function, but this is the measure I made:
Complete/Phase_Percent = CALCULATE(COUNT('all_projects'[Team Complete (%)]), filter('all_projects','all_projects'[Team Complete (%)]=100 && ('all_projects'[Ph 0]=100 && 'all_projects'[Phase 1-2]=100 &&'all_projects'[Ph 3]=100 && 'all_projects'[Ph 4a]=100 && 'all_projects'[Ph 4b-5]=100 && 'all_projects'[Ph 6]=100 && 'all_projects'[Ph 6_1]=100)))
/ CALCULATE(COUNT('all_projects'[Team Complete (%)]), FILTER('all_projects','all_projects'[Team Complete (%)]=100))*100
All numbers are under the datatype of "whole numbers".
Any help would be much appreciated.
That DAX looks good. To have a better readability, you can format it in DAX formatter. You don't have to *100 at the end, just format the measure as percentage. So what is the exact question in your case, to have a better understanding, please post some sample data and the expected output.
Complete/Phase_Percent = CALCULATE ( COUNT ( 'all_projects'[Team Complete (%)] ), FILTER ( 'all_projects', 'all_projects'[Team Complete (%)] = 100 && ( 'all_projects'[Ph 0] = 100 && 'all_projects'[Phase 1-2] = 100 && 'all_projects'[Ph 3] = 100 && 'all_projects'[Ph 4a] = 100 && 'all_projects'[Ph 4b-5] = 100 && 'all_projects'[Ph 6] = 100 && 'all_projects'[Ph 6_1] = 100 ) ) ) / CALCULATE ( COUNT ( 'all_projects'[Team Complete (%)] ), FILTER ( 'all_projects', 'all_projects'[Team Complete (%)] = 100 ) )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |