cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jhaastBI
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: 

OrderItemPrice
1000Laptop€850

1000

Keyboard€150

1001

Laptop€650
1001Keyboard€100
1002Laptop€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
amitchandak
Super User IV
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!

View solution in original post

2 REPLIES 2
amitchandak
Super User IV
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!

View solution in original post

Thank you a lot! That is the solution.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

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

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

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.

secondImage

Experience what’s next for Power BI

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