Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Mattula
Frequent Visitor

Calculating Percentage of Quota used

Hi All 

 

This is probably something very simple but I am new to PowerBi and I am really struggling to make it happen. 

 

I have a table which has quotas per team 

 

Quota PropertiesClip Quota

Team A30000
Team B90000
Team C32000
Team D60000
Team E22000
Total Quota234000

 

Another table (UniqueClips) with all the clip data, one of the columns of this data is user group. The unique values of the user group detailed below.

 

User Group

Team A - soccer - can
Team A - Soccer - de
Team A – Soccer - en
Team A – Soccer - es
Team A - Soccer - it
Team A – Soccer - jp
Team A - Social - DACH
Team A - Social - Spain
Team A-  Social -Japan
Team A Germany
Team A
Team B
Team A Internal 
Team C
Team E 
Team D
Team D Social

 

How would I calculate all the team values from the unique clips table and then comapre them to the quotas in the quota table. 

 

The end goal would be to show 

 

TEAM A = X% of the Quota and so on 

 

Any help greatly appreciated 

 

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Mattula ,

 

You can separate out the UniqueClips field in the power query and then create a relationship between the two tables. Then use the following formula to count the percentage of attributes:

1 =
VAR count_group =
    COUNTROWS ( table2 )
VAR Amount =
    CALCULATE ( COUNTROWS ( Table2 ), ALL ( Table2 ) )
RETURN
    count_group / Amount

vhenrykmstf_0-1654579813460.png

vhenrykmstf_1-1654579930482.png

vhenrykmstf_2-1654579945705.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @Mattula ,

 

You can separate out the UniqueClips field in the power query and then create a relationship between the two tables. Then use the following formula to count the percentage of attributes:

1 =
VAR count_group =
    COUNTROWS ( table2 )
VAR Amount =
    CALCULATE ( COUNTROWS ( Table2 ), ALL ( Table2 ) )
RETURN
    count_group / Amount

vhenrykmstf_0-1654579813460.png

vhenrykmstf_1-1654579930482.png

vhenrykmstf_2-1654579945705.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Mattula
Frequent Visitor

Thanks for the response. 

 

But I am not really following what I need to do here. In the meantime I have calculated the individual teams total clip usage. I just need to divide it against the quota but have been unable to achieve this.

lbendlin
Super User
Super User

For each "row" in your source data you can grab the "current"  value of the quota for the team in the filter context.  Then you grab the same quota value, but you remove the team filter, for example with ALLSELECTED().  Then divide one by the other.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.