cancel
Showing results for
Search instead for
Did you mean:
Regular Visitor

## Calculate subtotals and filter those subtotals of an table

Hi People,

Most of my data is detailed item line level and is not summarized data.

An example, multiple orders and each item of an order stored on a separate line:

 Order Item Price 1000 Laptop €850 1000 Keyboard €150 1001 Laptop €650 1001 Keyboard €100 1002 Laptop €1.250

I want to know how many orders are smaller than €1.000.

Can somebody tell me how I can calculate this without creating a new table?

Thank you in advance.

1 ACCEPTED SOLUTION
Super User IV

@jhaastBI , Try measure like

count order = countx(filter(summarize(Table, Table[Order],"_1" ,sum(Table[Price])), [_1]<1000), [Order])

Sum Price = countx(filter(summarize(Table, Table[Order],"_1" ,sum(Table[Price])), [_1]<1000), [_1])

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

2 REPLIES 2
Super User IV

@jhaastBI , Try measure like

count order = countx(filter(summarize(Table, Table[Order],"_1" ,sum(Table[Price])), [_1]<1000), [Order])

Sum Price = countx(filter(summarize(Table, Table[Order],"_1" ,sum(Table[Price])), [_1]<1000), [_1])

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Regular Visitor

Thank you a lot! That is the solution.

## Helpful resources

Announcements

#### Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

#### Check it Out!

Click here to read more about the April 2021 Updates!

#### The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

#### Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors