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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ibrahim_emara
Frequent Visitor

way to count or sum measure results instead of use summarize tables

if that posible to make mesure to count brands count bigger than 10 for example instead of do with by summarize table try this formula

 

 

 

Measure_count = if(SUMX( SUMMARIZE('product','product'[Brand], 'product'[List Price], "brand_column", COUNT('product'[Brand])),COUNT([brand_column]))>=10,1,0)

 

 

and the count its results by this formula

 

 

Measure 5 = COUNTROWS(FILTER('product',[Measure_count]=1))

 

 

but it return blank thanks for advance

8 REPLIES 8
Anonymous
Not applicable

HI @ibrahim_emara,

You can try to use the following measure formula if it is suitable for your requirement: (I add the category group fields and allselected function to calculate current brand count)

formula =
VAR brandcount =
    CALCULATE (
        COUNT ( 'product'[Brand] ),
        ALLSELECTED ( 'product' ),
        VALUES ( 'product'[Brand] ),
        VALUES ( 'product'[List Price] )
    )
RETURN
    IF ( brandcount >= 10, 1, 0 )

Regards,

Xiaoxin Sheng

ibrahim_emara_0-1648067522949.png

your formula or my formule retrive 1 for every barnd , i try to put it in card so get to me sum of 1 only so to be 5  but cured get to me 1

Anonymous
Not applicable

Hi @ibrahim_emara,

I think this scenario should be related to the measure total level calculation with multiple level aggregations.

Measure Totals, The Final Word 

You can try to use the following measure formula with a variable summarize table to aggregate the first level and use the iterator function to apply the second level aggregation:

formula =
VAR summary =
    SUMMARIZE (
        'product',
        'product'[Brand],
        'product'[List Price],
        "Brand count", IF ( COUNT ( 'product'[Brand] ) >= 10, 1, 0 )
    )
RETURN
    SUMX ( summary, [Brand count] )

Regards,

Xiaoxin Sheng

truptis
Community Champion
Community Champion

@ibrahim_emara , then try this: 

Result = CALCULATE(COUNT('product'[Brand]),FILTER('product','product'[Brand]>10))

 

@ibrahim_emara -> if this work, then please mark it as a solution and hit the Thumbs up! Thanks. 

@truptis  it try this but get this error 
MdxScript(Model) (13, 80) Calculation error in measure 'product'[Measure 6]: DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.

thanks for our efforts 

 

@ibrahim_emara  - Make your Brand column as an integer since it is storing the count in it?

truptis
Community Champion
Community Champion

Hi @ibrahim_emara ,

Try this:

Result = var count_greaterthan10 = IF(count('product'[Brand]) > 10, 1,0)
return sum(count_greaterthan10)

i try that but in sum must get column not measure 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.