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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Measure

Hi there,

 

I have 2 columns of data; Product & Minimum order quantity. However sometimes I can have mission data in column #3 and I want to be able to count those value of a product that are either with data, or blank, if the same product has both a zero & number value. The goal is to count up the number of items that are not uniformly containing the data they should [Apple & Orange], without being skewed by products that are completely blank [Strawberry]. 

 

Apple

50
Apple0
Apple0
Orange0
Orange20
Strawberry0
Strawberry0
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Create a new colum

column =
var _cnt_0 = countx(filter(table,[Product] =earlier([Product]) && [Qty]=0),[Product])
var _cnt = countx(filter(table,[Product] =earlier([Product]),[Product])
return 
if(_cnt_0 = 0 || _cnt =0,"Uniform","Non Uniform")
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may create measure like DAX below.

 

 

Measure1 =
VAR _CountAll =
    COUNTROWS ( FILTER ( Table1, Table1[Product] = MAX ( Table1[Product] ) ) )
VAR _CountZero =
    COUNTROWS (
        FILTER (
            Table1,
            Table1[Product] = MAX ( Table1[Product] )
                && Table1[quantity] = 0
        )
    )
VAR _CountNoZero =
    COUNTROWS (
        FILTER (
            Table1,
            Table1[Product] = MAX ( Table1[Product] )
                && Table1[quantity] <> 0
        )
    )
RETURN
    IF (
        _CountZero = _CountAll
            || _CountNoZero = _CountAll,
        "Uniformly",
        "Not Uniformly"
    )

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

5 REPLIES 5
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You may create measure like DAX below.

 

 

Measure1 =
VAR _CountAll =
    COUNTROWS ( FILTER ( Table1, Table1[Product] = MAX ( Table1[Product] ) ) )
VAR _CountZero =
    COUNTROWS (
        FILTER (
            Table1,
            Table1[Product] = MAX ( Table1[Product] )
                && Table1[quantity] = 0
        )
    )
VAR _CountNoZero =
    COUNTROWS (
        FILTER (
            Table1,
            Table1[Product] = MAX ( Table1[Product] )
                && Table1[quantity] <> 0
        )
    )
RETURN
    IF (
        _CountZero = _CountAll
            || _CountNoZero = _CountAll,
        "Uniformly",
        "Not Uniformly"
    )

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Create a new colum

column =
var _cnt_0 = countx(filter(table,[Product] =earlier([Product]) && [Qty]=0),[Product])
var _cnt = countx(filter(table,[Product] =earlier([Product]),[Product])
return 
if(_cnt_0 = 0 || _cnt =0,"Uniform","Non Uniform")
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Fowmy
Super User
Super User

@Anonymous 

Can you show what is the expected output from the sample ou have given?
And, you can include more data with your sample for clear understanding.

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Hopeful output is to show "2 products have incomplete data [minimum value & zero value recorded], 1 product is a flat zero in minimum order values entered"

@Anonymous 

Try this as  a measure:

Find Missing = 
var crow =COUNTROWS('Table')
var czero = 
    CALCULATE(
        COUNTROWS('Table'),
        'Table'[Value] = 0
    )
return
IF(
     crow = czero ||
    (ISBLANK(czero)),
    BLANK(),
    "Missing"
)

Fowmy_0-1597050206111.png

 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors