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
hkrash0920
Helper I
Helper I

Need Help, Question about divide() function

I am using the divide function to determine the percentage of revenue needed to get to goal. The formula I am using is

 

"Revenue Needed % = Divide ([Revenue Needed], [Revenue Goal],0)"

 

Below is the result I am getting

 

Capture.PNG

 

Why am I getting 101% for both when the correct answer is 56% and 52%?

 

Thanks

1 ACCEPTED SOLUTION

And revenue needed % is calc. column as well? Must be otherwise it wouldn't work (row level context)

 

Could you try to write the % as a measure?

 

% as Measure = DIVIDE(SUM(test[Revenue Needed]);SUM(test[Revenue Goal]);0) 

In my little rebuildet table both worked.

 

example.jpg

 

 

View solution in original post

11 REPLIES 11
hkrash0920
Helper I
Helper I

Thank you...Thank you...Thank you. It worked. I really appreciate it. You are the best. 🙂

vanessafvg
Super User
Super User

what is the dax code for your base measures?

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




For Revenue Needed, it is Revenue Needed = [Revenue Goal] - [FY17 FYTD TER]

 

The FY17 FYTD TER and Revenue goal columns are number fields in the data file that are summarized.

 

I am new to Power BI so if this is not what you are looking for, please let me know.

and the values are in the same table?

 

it looks like a relationship issue to me but i could be wrong.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




They are in the same table.

i think the only way i could figure out the problem is if you posted the pbix.

 

The data types are all decimal yes?  or currency?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I am unable to publish the pbix. The data type is currency.

@hkrash0920

 

is revenue needed a measure or calc. column?

 

 

And is this the whole table or are there any more information that "filter" the position in the table?

 

It is a calc column. This is a only a portion of the table. The table probably has about 30 rows. It is not filtered by anything.

And revenue needed % is calc. column as well? Must be otherwise it wouldn't work (row level context)

 

Could you try to write the % as a measure?

 

% as Measure = DIVIDE(SUM(test[Revenue Needed]);SUM(test[Revenue Goal]);0) 

In my little rebuildet table both worked.

 

example.jpg

 

 

Thank you...Thank you...Thank you. It worked. I really appreciate it. You are the best.

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.