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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
ndris
Helper I
Helper I

Summary in Top N

Hello i have 2 tables a issues pleas i need your help  :

cashflow :

- id 

- commitment 

- NAV  (But NAV is measure)

 

investee : 

_id 

_legalname 

 

I want to get in matrix Top 5 of legalname according [NAV]  and display it in matrix like ;

 

Legalname| %Nav | %commitment 

 

---------------------------

This this measure that i have create 

 

TOPN(5,
SUMMARIZE(Investee,
Investee[LegalName],
"Test",SUMX(RELATEDTABLE(CashFlows),CashFlows[Commitment])
),[Test]
)

 

but it's don't work 

 

Thanks in advance 

 

I want to

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @ndris ,

First, using TOPN function will return a table not specific value, so it need to create a calculated table not measure...

TOPN(5,
SUMMARIZE(Investee,
Investee[LegalName],
"Test",SUMX(RELATEDTABLE(CashFlows),CashFlows[Commitment])
),[Test]
)

Do you want to get the TOPN legalnames? If yes, you can refer the following links to get it.

How to Create Power BI TOP N Report (Variable TOP N Filter) 

3 ways to get TOPN values in Power BI

Filter top n records Power BI

If the above one is not working for you, please provide some sample data(exclude sensitive data) with Text format and your expected result with special examples and screenshots. It is better if you can provide me a simplified pbix file. Thank you.

Best Regards

Community Support Team _ Rena
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-yiruan-msft
Community Support
Community Support

Hi @ndris ,

First, using TOPN function will return a table not specific value, so it need to create a calculated table not measure...

TOPN(5,
SUMMARIZE(Investee,
Investee[LegalName],
"Test",SUMX(RELATEDTABLE(CashFlows),CashFlows[Commitment])
),[Test]
)

Do you want to get the TOPN legalnames? If yes, you can refer the following links to get it.

How to Create Power BI TOP N Report (Variable TOP N Filter) 

3 ways to get TOPN values in Power BI

Filter top n records Power BI

If the above one is not working for you, please provide some sample data(exclude sensitive data) with Text format and your expected result with special examples and screenshots. It is better if you can provide me a simplified pbix file. Thank you.

Best Regards

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

Is this a measure or a calculated column?

 

Please provide sanitized sample data that fully covers your issue. I cannot help you without meaningful sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors