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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mrslyfox
Helper II
Helper II

Ranking TopN Others

Hello,

 

Have two formulas to get 'Others' value for New Customer Volume by each customer.

The methodology working well with rest of 'Other' kpi's I have, but this one use copmlex measure and return zero.

 

RANK_NewCusM2_MEASURE = RANKX(ALLSELECTED(D_Customer[Customer]),CALCULATE(
    SUM(F_Invoice[M2]),
    FILTER(
        D_Customer,
        CALCULATE(COUNTROWS(F_Invoice))>0 &&
        CALCULATE(
           COUNTROWS(F_Invoice),
           FILTER(
               ALL(D_Date),
               D_Date[DATE_Date]< MIN(D_Date[DATE_Date])
            )
        )=0
    )))

 

Others Total NewCusM2 = IF( ISBLANK(CALCULATE(
    SUM(F_Invoice[M2]),
    FILTER(
        D_Customer,
        CALCULATE(COUNTROWS(F_Invoice))>0 &&
        CALCULATE(
           COUNTROWS(F_Invoice),
           FILTER(
               ALL(D_Date),
               D_Date[DATE_Date]< MIN(D_Date[DATE_Date])
            )
        )=0
    ),FILTER(all(D_Customer[Customer]),[RANK_NewCusM2_MEASURE]> 20))),0,CALCULATE(
    SUM(F_Invoice[M2]),
    FILTER(
        D_Customer,
        CALCULATE(COUNTROWS(F_Invoice))>0 &&
        CALCULATE(
           COUNTROWS(F_Invoice),
           FILTER(
               ALL(D_Date),
               D_Date[DATE_Date]< MIN(D_Date[DATE_Date])
            )
        )=0
    ),FILTER(all(D_Customer[Customer]),[RANK_NewCusM2_MEASURE]>20)))

1 REPLY 1
Anonymous
Not applicable

Hi @mrslyfox,

 

It is hard to test your formula without any sample data, can you please share some detail contents?

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.