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.
Hello,
I am trying to get a count of tests a supervisor has done per day and also show what percentage that count if of the supervisors total. I know this can be done using a table matrix and selecting Percent of Row Total but I need to get a roll up count for anything over 50%.
Example:
Toms testing: total of 449 tests
Day of Week | Total Tests | Percentage of Total |
Monday | 66 | 14.7% |
Tuesday | 97 | 21.6% |
Wednesday | 134 | 29.8% |
Thursday | 61 | 13.5% |
Friday | 91 | 20.2% |
Solved! Go to Solution.
Hi @tomperro ,
According to your sharing sample, I think you want to get the count of total test based on the filter condition. Based on this understanding, here are my test process
To achieve your goal, you can follow these steps:
The data you provided seem that cannot meet the condition, here are my test data
1.Create a measure by using DAX to calculate the percentage of total
Percentage of total = DIVIDE(
SUM('Table2'[Total Test]),
CALCULATE(
SUM('Table2'[Total Test]),
ALL('Table2'[Day of Week])
)
)
2.Create another measure to get the count of rows
Measure =
var a=[Percentage of total]
var tab=SUMMARIZE('Table2','Table2'[Day of Week],"@percent",a)
return COUNTROWS(FILTER(tab,[@percent]>0.5))
3.Create the final >50% total count measure
>50% total count = SUMX(VALUES('Table2'[Day of Week]),[Measure])
4.Final output
I hope my solution can help you, but if it doesn’t, you can always share your thoughts and feedback with me by posting a comment below this post.
In order for you to solve the problem faster, you can refer to the following documentation
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Albert He
Hi @tomperro ,
According to your sharing sample, I think you want to get the count of total test based on the filter condition. Based on this understanding, here are my test process
To achieve your goal, you can follow these steps:
The data you provided seem that cannot meet the condition, here are my test data
1.Create a measure by using DAX to calculate the percentage of total
Percentage of total = DIVIDE(
SUM('Table2'[Total Test]),
CALCULATE(
SUM('Table2'[Total Test]),
ALL('Table2'[Day of Week])
)
)
2.Create another measure to get the count of rows
Measure =
var a=[Percentage of total]
var tab=SUMMARIZE('Table2','Table2'[Day of Week],"@percent",a)
return COUNTROWS(FILTER(tab,[@percent]>0.5))
3.Create the final >50% total count measure
>50% total count = SUMX(VALUES('Table2'[Day of Week]),[Measure])
4.Final output
I hope my solution can help you, but if it doesn’t, you can always share your thoughts and feedback with me by posting a comment below this post.
In order for you to solve the problem faster, you can refer to the following documentation
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Albert He
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 |
---|---|
113 | |
103 | |
76 | |
66 | |
63 |
User | Count |
---|---|
142 | |
105 | |
102 | |
81 | |
68 |