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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
po
Post Prodigy
Post Prodigy

calculate the count and measure as filter

Hi,

 

Have a table with following columns

 

Yrwk Region Shop Day Supplied Credited

 

We then have a measure whereby we calculate % sold and have a flag to indicate if missed target (i.e. % sold less than target)

 

iF ('%sold < MIN(target),1,0)
 
Wish now to count the number of shops in a region in a week where have failed but if try and craete maesure as
sum(iF ('%sold < MIN(target),1,0)) doesn't allow this.
 
What is the best way to achieve a count of number of rows within a region which have % sold below target in the example above?
 
Thanks

 

 

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @po ,

 

I have a little confused about your requirement.

 

Do you want to count the the rows and the measure as a filter condition?

 

If it is, you could refer to my test.Capture.PNG

 

If that is not your case, please share your data sample and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @po ,

 

I have a little confused about your requirement.

 

Do you want to count the the rows and the measure as a filter condition?

 

If it is, you could refer to my test.Capture.PNG

 

If that is not your case, please share your data sample and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thansk for update

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.