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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.