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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
umutkoyun
Frequent Visitor

calculating expect top 10

hi,

 

I want to add the total balance which are not in top 10 to the bottom of the table .

 

I wrote the below formula (with the help of another answer by Cherie Chen)

but i cannot add it to the Rows. Can you please help ?

 

 

Measure = 
VAR a =
    SUMMARIZE (
        'Mizan Özet'
        ,'Mizan Özet'[Firma Adı]
        ,'Mizan Özet'[Hesap No]
        ,"Toplam", calculate (sum('Mizan Özet'[Toplam]), 'Mizan Full'[Hesap Grubu] = "320", 'Mizan Özet'[Toplam] < 0 )
     
    )
VAR b =
    ADDCOLUMNS ( a, "rank", RANKX ( a, [Toplam] ) )
RETURN
    CALCULATE (
        SUM ( 'Mizan Özet'[Toplam] ) ,
        FILTER ( b, [rank] > 10 )
    )

 

 Adsız.jpg

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @umutkoyun ,

Sorry I'm not clear what you mean "cannot add it to the Rows". Does the formula get the correct result or not?

Would you please explain more.

Best Regards,
Community Support Team _ kalyj

hi there,

 

thanks for your time. I could create totally another table including the top ten rows and 11th row as a sum of the other data. But i thought it is a long shoot so i decided to cover it by measures. That's 11th row I am trying to calculate and add it the matrix which has already top ten rows (i used filters)

 

umutkoyun_0-1656592361332.png

Rank320EksiHesaplar = 
                    RANKX(ALLSELECTED('Mizan Özet'[Hesap No]),
                    CALCULATE( 
                                sum('Mizan Özet'[Toplam])
                                ,'Mizan Özet'[Hesap Grubu] = "320"
                               //,filter(ALLSELECTED('Mizan Özet'), sum('Mizan Özet'[Toplam]) < 0)
                            )
                            
                            ,,1)

 

 

I hope this clarifies my and your question.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors