cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
niteshtrehan89
Helper III
Helper III

Urgent Help - Top N analyses with Legends

Hi team,

 

I need a urgent dax changes for the TOP N analysis using the legend. if i am not putting the legend in the stacked bar chart then it is working fine but as soon as I put the legend the the TOP N is not working as expected . Legend name is Product.

niteshtrehan89_0-1638685336367.png

 

Below is the dax function, 

TopN Exporter =
VAR SelectedTop = SELECTEDVALUE('Top'[Top])
RETURN
SWITCH(TRUE(),
SelectedTop = 0, [Total Quantity],
RANKX (
ALLSELECTED(MasterData[Exporter Name]),
[Total Quantity]
)
<= SelectedTop,
[Total Quantity]
)
 
Please help me out asap on the requirement.
1 ACCEPTED SOLUTION
PaulDBrown
Super User
Super User

As @TomMartens says, your request is not very clear.

If you are looking to show values based on a slicer selection for TopN values, this thread might help:

https://community.powerbi.com/t5/Desktop/Instead-Top-N-records-show-inbetween-N-to-N/m-p/2217390#M80... 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
PaulDBrown
Super User
Super User

As @TomMartens says, your request is not very clear.

If you are looking to show values based on a slicer selection for TopN values, this thread might help:

https://community.powerbi.com/t5/Desktop/Instead-Top-N-records-show-inbetween-N-to-N/m-p/2217390#M80... 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






TomMartens
Super User
Super User

Hey @niteshtrehan89 ,

 

I have to admit that I do not understand what you are looking for.

If you need urgent help (be aware that most of us are here in our spare time), take the time and create a pbix file that contains sample data but still represents your data model (tables, relationships, calculated columns, and measures). Upload the file to onedrive or dropbox and share the link. If you are using Excel to create the sample data share the Excel as well.

Do not forget to explain the expected result based on the sample data you provided.

 

Regards,

Tom



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

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors