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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jamuka
Advocate II
Advocate II

How to Calculate with Two Criteria

Hello,

 

I'm making an ABC analysis report and couldn't show total product number for each group in matrix visual. When I do it for total value of products, it shows correct numbers but for quantity it shows total result for each group.

I guess I should use calculate but I don't how to use it in my case. I created a new measure with calculate function but couldn't figure out how to add two criteria to measure.

I need to show quantity based on group and stock availability. my columns are in same table.

 

regards

Wrong Count.jpg

1 ACCEPTED SOLUTION

Hi @calerof,

 

This if the first time I'm using power bi.

I have several workbooks and I extract data from them via calculated column ( with lookupvalue) to my main table. Then I made some basic math calculations, still with calculated columns. There's no measure in my screenshots,  but when I tried to write the measure so I can post, I figured my mistake. 

I didn't add "count" function to my measure, when I added it works.

 

= CALCULATE(COUNT(Listing[Product]);Listing[Day]="Without Stock")
 
thanks for your help

View solution in original post

2 REPLIES 2
calerof
Impactful Individual
Impactful Individual

Hi @jamuka ,

 

And, where are your measures?

 

Cheers,

 

Fernando

 

Hi @calerof,

 

This if the first time I'm using power bi.

I have several workbooks and I extract data from them via calculated column ( with lookupvalue) to my main table. Then I made some basic math calculations, still with calculated columns. There's no measure in my screenshots,  but when I tried to write the measure so I can post, I figured my mistake. 

I didn't add "count" function to my measure, when I added it works.

 

= CALCULATE(COUNT(Listing[Product]);Listing[Day]="Without Stock")
 
thanks for your help

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.