cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powerbi-learner
Helper I
Helper I

Dax calculation assistance

Hi could you help me?

 

I could do this calculation in Excel, but DAX is entirely new to me.

 

Column 1 has names the following names in each row eg John, Fred, Jane

Column 2 has the states the total population of potential leads in the respective areas for those in column 1 eg 50, 70, 90 (in each of the first 3 rows).

 

Column 3 lists how many leads that John Fred and Jane made contact with eg 20, 40, 50.

 

John Fred and Jane need to make contact with 95% of leads over the quarter. I need to calculate a measure showing how many lead contacts needed for John Fred and Jane to reach the 95% target.

 

The formula will look like this: Measure = (0.95 * Total Population) - Leads made contact with

 

or: Measure = (0.95 * column 2) - column 3

 

How do I write that in DAX?

 

The actual data is below.

 

So I need to calculate the following:

Measure = (0.95 * Base Population) - Enrolled

 

How do I write that in DAX?

 

Where can I learn how to write formulae in DAX? Thanks so much Power BI experts!

 

Thanks so much :-image.png

1 ACCEPTED SOLUTION
Greg_Deckler
Super User IV
Super User IV

So, the formula should be something like:

 

Measure = (SUM([Base Population]) * .95) - SUM([Enrolled])

As a column, you could just do:

 

Column = ([Base Population] * .95) - [Enrolled]

Parenthesis around the multiplication are not strictly necessary given order of operations.


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Greg_Deckler
Super User IV
Super User IV

So, the formula should be something like:

 

Measure = (SUM([Base Population]) * .95) - SUM([Enrolled])

As a column, you could just do:

 

Column = ([Base Population] * .95) - [Enrolled]

Parenthesis around the multiplication are not strictly necessary given order of operations.


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

smoupre you're amazing mate!!

 

your solution worked perfectly!

 

You're a Power BI Expert!!!

 

Thanks mate!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors