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.
I'm new to Power BI and DAX and I couldn't find a solution to my probelm.
I have a table like below image. Profiles have total revenue, gross profit and gross profit percenteages against month. I wanted to filter top 30 profiles for each month baesd on revenue using DAX.
So far I tried TOPN function which filter top 30 porifles from all data.
TOPN(30, 'Profile Info', 'Profile Info'[Total Revenue])
But what I wanted is filter top profiles of each month.
Can someone hlep me on this?
Thank you
Solved! Go to Solution.
Here's a link to pbix that i have created. It shows top 30 products for every month in slicer as per the measure 'Total Sales'.
https://1drv.ms/u/s!AikPceQOhqFEhAUDFBJndxNic9jy?e=171rsT
Thanks.
Hi,
You can add a TopN filter from the filter pane and add your measure in the 'By Value' field as below:
The below filter will only show the Top 10 counties by 'Total Cost' measure.
Thanks.
Hi thank you.
This is not my requirement. I want to get top 30 profiles for each month and based on those 30 profiles I have to create top 5 visualizations as mentioned in the example
Hi,
Could you please share some sample data and expected output in an excel.
Thanks.
Hi I have modified my question.What I wanted from my data set is to filter top 30 profiles based on revenue for each month using a dax quey.
@Anonymous wrote:Hi,
Could you please share some sample data and expected output in an excel.
Thanks.
Here's a link to pbix that i have created. It shows top 30 products for every month in slicer as per the measure 'Total Sales'.
https://1drv.ms/u/s!AikPceQOhqFEhAUDFBJndxNic9jy?e=171rsT
Thanks.
@Anonymous wrote:Here's a link to pbix that i have created. It shows top 30 products for every month in slicer as per the measure 'Total Sales'.
https://1drv.ms/u/s!AikPceQOhqFEhAUDFBJndxNic9jy?e=171rsT
Thanks.
Thank you so much. This helped to do the ranking.But I tried a Bottom N filter to filter the lowest values from top 30 list. Returns nothing. May be I'm in a misunderstanding of how top n filter works. Can you help me on that? https://drive.google.com/file/d/1uTBS6GCIaRc2R6uxX8Vyf4Ti-pupKaxk/view?usp=sharing
Thanks.
Hi,
To get the Bottom 5 from the Top 30 you have 2 options:
Option 1: With current setting, Add a 'Product Rank' filter in the second visual as below
Option 2:
Create a new measure and in TopN filter get only Top 5 fields.
Product Rank Bottom = RANKX( ALL(Product_Data), [Total Sales], , ASC )
I have added the file with Option 1 on Ondrive at below location:
https://1drv.ms/u/s!AikPceQOhqFEhAfno1QRMNg4kgXg?e=MyXikI
Thanks.
Thanks.
@Anonymous wrote:Hi,
To get the Bottom 5 from the Top 30 you have 2 options:
Option 1: With current setting, Add a 'Product Rank' filter in the second visual as below
Option 2:
Create a new measure and in TopN filter get only Top 5 fields.
Product Rank Bottom = RANKX( ALL(Product_Data), [Total Sales], , ASC )I have added the file with Option 1 on Ondrive at below location:
https://1drv.ms/u/s!AikPceQOhqFEhAfno1QRMNg4kgXg?e=MyXikI
Thanks.
Thanks.
Sorry. I have misinterpreted the scenario. I wanted to use the bottom n filter not on the raking field but with another field to the top 30 records.
Can you please have a look ?
https://drive.google.com/open?id=1EyL7c-LxHI2GRUFWo8ibe1jrmkXlpiEI
Thank you
Hi I have found a solution for that. Thank you for your help
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |