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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Gerald23
Helper I
Helper I

Count value and filter by other column

Hi Everyone,

 

I have a table that looks like this:

 

Order DateOrder NumberCustomer NumberArticle NumberQualtity OrderedSold PriceNP

SoldPrice-NP

(This is a calculated Column)

1-1-202212301789310.8012.81-2.01
2-2-20221240279080.003.33-3.33
13-2-20221251078964.6612.81-8.15
14-2-20221261423053.342.510.83
16-2-20221302548612.401.061.34
18-2-2022140868522013.9918.95-4.96

 

Now i have created a measure to calculate the number of different items that are sold below the NP price that looks like this

 

Count #sold cheaper NP = CALCULATE(COUNT(Data[SoldPrice-NP]), Data[SoldPrice-NP] < 0)

 

 
But now I also want a measure that counts all articles that are sold below the NP price. So I need to count the values in the Quantity Ordered column but only when SoldPrice-NP is below 0. How could I achieve this?
 
 
 
1 ACCEPTED SOLUTION
Gerald23
Helper I
Helper I

That was easier then I expected xD

 

I used the code below to achieve this

 

Count all article below 0 = CALCULATE(SUM(Data[Quantity Ordered]), Data[SoldPrice-NP] < 0)

View solution in original post

1 REPLY 1
Gerald23
Helper I
Helper I

That was easier then I expected xD

 

I used the code below to achieve this

 

Count all article below 0 = CALCULATE(SUM(Data[Quantity Ordered]), Data[SoldPrice-NP] < 0)

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.