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

FILTER & CALCULATE

Hi Guys,

 

I have a little issue here...

 

Considering he following data:

 

example data.JPG

 

 

 

 

 

 

 

 

 

 

 

 

I need to calculate the percentage solded and returned regarding the total of each client for items sold and items returned, how do I configure the "New Column"

 

Thanks,

I

 

 

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

It seems that you want to create the calculated column for % sold and % returned.

 

Please try with the two formulas below.

 

% sold =
'Table1'[Sell]
    / CALCULATE ( SUM ( 'Table1'[Sell] ), ALLEXCEPT ( Table1, Table1[Client] ) )

% returned =
'Table1'[Reutrned]
    / CALCULATE ( SUM ( 'Table1'[Reutrned] ), ALLEXCEPT ( Table1, Table1[Client] ) )

Here is the output.

 

Capture.PNG

 

If you still need help, please share your desired outout so that we could help further on it.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

It seems that you want to create the calculated column for % sold and % returned.

 

Please try with the two formulas below.

 

% sold =
'Table1'[Sell]
    / CALCULATE ( SUM ( 'Table1'[Sell] ), ALLEXCEPT ( Table1, Table1[Client] ) )

% returned =
'Table1'[Reutrned]
    / CALCULATE ( SUM ( 'Table1'[Reutrned] ), ALLEXCEPT ( Table1, Table1[Client] ) )

Here is the output.

 

Capture.PNG

 

If you still need help, please share your desired outout so that we could help further on it.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dedelman_clng
Community Champion
Community Champion

Create these as measures:

 

Pct Sold =
CALCULATE (
    DIVIDE (
        SUM ( Sold[Sell] ),
        SUM ( Sold[Sell] ) + SUM ( Sold[Returned] ),
        0
    )
)


Pct Returned =
CALCULATE (
    DIVIDE (
        SUM ( Sold[Returned] ),
        SUM ( Sold[Sell] ) + SUM ( Sold[Returned] ),
        0
    )
)

Capture.PNG

 

Hope this helps

David

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.