Forum Discussion
Compliance reporting - Formula
Hi,
I have the below table, I want to show as a percentage and by region, who is compliant.
For example ANZ has three people, they each need to hit a bluesheet = yes number of 3 to be 100% compliant. If 2 out of the 3 hit, they are 66%, 1 out of three hit 33% compliant.
Can anyone help me please!
- Anonymous1 year ago
Hi timward10
Please try the following Measure :Measure = VAR _select_region = SELECTEDVALUE('Table'[Region]) VAR _count_3 = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[Bluesheet = Yes] = 3 && 'Table'[Region] = _select_region)) VAR _count_region = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[Region] = _select_region)) RETURN _count_3 / _count_regionResult:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- rohit1991
Super User
Hi timward10 ,
Based on your table, we can calculate compliance percentages by region by checking how many owners meet the "Bluesheet = Yes" threshold of 3. For each region, we count how many owners hit that threshold and divide it by the total number of owners in that region.For example, in ANZ, you have four owners (Ann Serpell, George Koukides, Moveen Narayan, and Manish Pandit). If none of them reach 3 bluesheets, compliance is 0%. If 1 out of 4 reaches it, compliance is 25%, and so on.
Looking at your table, it seems Benelux has two owners meeting the threshold, making it 100% compliant. Meanwhile, ANZ and Asia Pacific show 0% compliance since no one hits the required bluesheets.
- AnonymousNot applicable
Hi timward10
Please try the following Measure :Measure = VAR _select_region = SELECTEDVALUE('Table'[Region]) VAR _count_3 = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[Bluesheet = Yes] = 3 && 'Table'[Region] = _select_region)) VAR _count_region = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[Region] = _select_region)) RETURN _count_3 / _count_regionResult:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.