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

Condition based formula

suppose I have data as illustrated in the picture link below. Does anyone know how I can embed the following formula 100(sum(KPI1)/sum(KPI1_COUNT))* as a new column. With the sum being based on each unique "Applicant_Company" and each month.screenshot.png

1 ACCEPTED SOLUTION

@Anonymous , earlier will kind of create a partition

This means a new column all Applicant_Company will same value if you replace it WORK_AREA, All WORK_AREA will have same will value .

 

You add too

 

Measn combination of [WORK_AREA] and Applicant_Company will have same value

divide(Sumx(filter(Table, [Applicant_Company] =earlier([Applicant_Company]) && [WORK_AREA] =earlier([WORK_AREA]) ),[KPI1]),Sumx(filter(Table, [Applicant_Company] =earlier([Applicant_Company]) && [WORK_AREA] =earlier([WORK_AREA])  ),[KPI1_COUNT])) *100

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , A new column like

divide(Sumx(filter(Table, [Applicant_Company] =earlier([Applicant_Company])),[KPI1]),Sumx(filter(Table, [Applicant_Company] =earlier([Applicant_Company])),[KPI1_COUNT])) *100

Anonymous
Not applicable

Thanks! Can I ask, would the formula you produced also work if I wanted the sum to be based on 'WORK_AREA' as well as 'APPLICANT_COMPANY'?

@Anonymous , earlier will kind of create a partition

This means a new column all Applicant_Company will same value if you replace it WORK_AREA, All WORK_AREA will have same will value .

 

You add too

 

Measn combination of [WORK_AREA] and Applicant_Company will have same value

divide(Sumx(filter(Table, [Applicant_Company] =earlier([Applicant_Company]) && [WORK_AREA] =earlier([WORK_AREA]) ),[KPI1]),Sumx(filter(Table, [Applicant_Company] =earlier([Applicant_Company]) && [WORK_AREA] =earlier([WORK_AREA])  ),[KPI1_COUNT])) *100

 

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.