The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
https://drive.google.com/file/d/1gX4B05MdvY5QmrNAakiU2Eq6Xy_OUWk4/view?usp=drive_link
I have this existing Measure :
Rank by Username = RANKX(all('TCM EncountersTCM'[UserName]), [Sum of nErrorsEnc],,DESC)
topN nErrorsEnc by Username = if([Rank by Username] <= 'Top Values'[Top Values Value], [Sum of nErrorsEnc])
With this image above its working well
but when I used a legend it gives all the list of user see image below.
My goal is just to put a legend on my Bar chart but when I do the visual breaks.
Solved! Go to Solution.
Hi, @JuradoKevin14
Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!
Best Regards
Yongkang Hua
Hi, @JuradoKevin14
In Power BI, legend fields can affect how data is grouped in visuals. When you add a field to a legend, Power BI might create a group for each unique value in that field, which may be why you're seeing all users and not just the top N users.
You can create a new column in your data that combines the username and error count.Use this new column for the axis of the bar chart. This will display both the username and the error count on the axis.
Add a legend field to the visual. Since the data is now grouped by User_Error columns, it should still only show the top N users based on errors.
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I kinda don't get your solution or I have tried it but it still doesnt work. I have attacehd a sample PBI file that has 2 sheets. 1 is the current and second is the Goal.
All data should be interactive by the slicer.
link asks for access - please check
Hi updated the link already. 🙂
Like this?
Not clear to me what you are trying to achieve.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
User | Count |
---|---|
26 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
30 | |
15 | |
12 | |
12 | |
7 |