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
jhaastBI
Helper I
Helper I

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
Super User

@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])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@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])

Thank you a lot! That is the solution.

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.

Top Solution Authors