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
Anonymous
Not applicable

Divide function giving different results

Hi All,

 

In first screenshot What i want is and in second sceenshot what i am getting is ,

How can i resilve it.

 

What i am gettingWhat i am getting

1 ACCEPTED SOLUTION

@Anonymous,

 

Is your table like this?

y7.PNG

I created a measure but didn't meet the error:

Measure 2 = 
VAR x = 
COUNTX(
    FILTER(
        Sheet9,
        [Status] = 2
    ),
    [Status]
)
VAR y = 
COUNTAX(
    Sheet9,
    Sheet9[Status POT]
)
RETURN
DIVIDE(
    y,
    x
)

The error is very strange.

 

Why did you add filters on this visual?

y8.PNG


Maybe you can remove the filters , then, try it again.

 

 

View solution in original post

11 REPLIES 11
Anonymous
Not applicable

Missed needed screenshot:Capture1.JPG

Hi @Anonymous ,

You want to use "DIVIDE" function to calculate the result, right?

Is the right result 0.79?

Maybe you can try this:

 

 

GRDSS - Payment On Time % = COUNTAX( table, table[column] ) / [Volume of Supplier Invoices Paid]

 

 

DIVIDE function vs divide operator (/) 

 

If it not work, please give me a sample data model.

 

Best regards,
Lionel Chen

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

Hi , Yes right result 0.79 but i am getting as 1 After Using GROSS - Payment On Time % = COUNTAX( 'Append-France,Greece,Monaco', 'Append-France,Greece,Monaco'[Status POT ] ) / [Volume of Supplier Invoices Paid] Thanks In Advance.

az38
Community Champion
Community Champion

@Anonymous 

if you get 1, maybe you just do not define Decimal places parameter as it need?

425077.png

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hi @az38 ,

 

i have given 2 as decimal place in Modelling it giveds me 1.00

@Anonymous,

 

Is your table like this?

y7.PNG

I created a measure but didn't meet the error:

Measure 2 = 
VAR x = 
COUNTX(
    FILTER(
        Sheet9,
        [Status] = 2
    ),
    [Status]
)
VAR y = 
COUNTAX(
    Sheet9,
    Sheet9[Status POT]
)
RETURN
DIVIDE(
    y,
    x
)

The error is very strange.

 

Why did you add filters on this visual?

y8.PNG


Maybe you can remove the filters , then, try it again.

 

 

Anonymous
Not applicable

Hi @v-lionel-msft ,

 

Your Logic was correct and  its Working fine Now.

Leasson Learned:Filters has to keep in Measure not on the Filters on the Page.

 

Thanks For your Help.

Anonymous
Not applicable

Hi @v-lionel-msft ,

 

I want calulate it on :

  • GROSS - Payment On Time %: Filter Status=”30”, Status POT =” Before Due”,Country="France" and Process Count of Status POT divided by Volume of supplier invoices paid .
  • I have to use all the filters..

I think this is the reason.

y4.PNGy5.PNG

Hi @Anonymous ,

Can you give me your .PBIX file?

Maybe we need to modify the DAX of  [Volume of Supplier Invoices Paid] .

 

Regards,
Lionel Chen

Anonymous
Not applicable

Hi @v-lionel-msft 

 

I have used measure as below:

 

Volume of Supplier Invoices Paid = COUNTX(FILTER('Append-France,Greece,Monaco','Append-France,Greece,Monaco'[Status]=30),'Append-France,Greece,Monaco'[Status])

 

i am unable to share PBIX file as per the security norms of organisation.

 

Best Wishes,

Younis Syed

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.