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

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.

Reply
Anonymous
Not applicable

Percent of filtered group

Hi Everyone!

 

Im glad to be joining your community as a new user (still newbie) on power BI! Time to leave excel dashboards behind.

 

Ive made some search on the forum looking for the solution i need but still couldnt figure it out.

 

On my data source i have many Product Codes grouped on Product families. I have the calculated "P1" percent column based on other two value columns.

 

Its working fine when calculating each of the codes %, but when i try to calc their  family, it sums instead of the % i need.

 

its family % should be:  9960/9200 = 108,26%

 

The formula im using on P1 column: 

P1 = DIVIDE(CALCULATE(SUM('Priorities (2)'[P1Done]),ALLSELECTED('Priorities (2)'[Product family])),(CALCULATE(SUM('Priorities (2)'[P1 FEB]),ALLSELECTED('Priorities (2)'[Product family]))),1)
 
Any help would be appreciated! Thanks!

 

Image and video hosting by TinyPic

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@Anonymous ,

Based on your description, my understanding is that you want to  change the Total number of the P1 column from the sum (308.5% = 108.7%+100.0%+99.8%) to average (108.3%=9960/9200).

 

In this scenario, we can create a measure rather than a calculated column like below:

P1 = DIVIDE(CALCULATE(SUM(Table1[P1Done]),ALLSELECTED(Table1[Product family])),CALCULATE(SUM(Table1[P1 FEB]),ALLSELECTED(Table1[Product family])),1)

1.png

 

Here is a blog which discusses about this, I would suggest you referring to it: https://www.jetglobal.com/blog/calculated-columns-vs-measures/

 

 


Regards,
Lydia

Community Support Team _ Lydia Zhang
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

1 REPLY 1
v-yuezhe-msft
Employee
Employee

@Anonymous ,

Based on your description, my understanding is that you want to  change the Total number of the P1 column from the sum (308.5% = 108.7%+100.0%+99.8%) to average (108.3%=9960/9200).

 

In this scenario, we can create a measure rather than a calculated column like below:

P1 = DIVIDE(CALCULATE(SUM(Table1[P1Done]),ALLSELECTED(Table1[Product family])),CALCULATE(SUM(Table1[P1 FEB]),ALLSELECTED(Table1[Product family])),1)

1.png

 

Here is a blog which discusses about this, I would suggest you referring to it: https://www.jetglobal.com/blog/calculated-columns-vs-measures/

 

 


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.