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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
mroi
New Member

how to filter by total sum and not row sum

hello,

I would like to display a table filtered by the total amount of purchases by supplier (purchases per supplier > 140 thousand)

The columns indicate different offices so that you can see the amount of purchases in each office with a summary column.

When I add the invoice number to the rows of the table (below the vendor number +), the filter refers to the invoice amount and not the total amount by vendor.

How can I create a measure that shows the total amount by supplier regardless of the invoice detail, and perform the filtering according to that measure?

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your data model looks like, but please try something like below and check whether it suits your requirement.

 

expected result measure: =
CALCULATE (
    SUM ( 'TableName'[InvoiceAmount] ),
    ALL ( 'TableName'[InvoiceDetail] )
)

Or,

 

expected result measure: =
CALCULATE (
    SUM ( 'TableName'[InvoiceAmount] ),
    ALLEXCEPT ( 'TableName', 'TableName'[VendorNumber] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your data model looks like, but please try something like below and check whether it suits your requirement.

 

expected result measure: =
CALCULATE (
    SUM ( 'TableName'[InvoiceAmount] ),
    ALL ( 'TableName'[InvoiceDetail] )
)

Or,

 

expected result measure: =
CALCULATE (
    SUM ( 'TableName'[InvoiceAmount] ),
    ALLEXCEPT ( 'TableName', 'TableName'[VendorNumber] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thank you for the quick response and for the simple and elegant solution.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.