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
cosminc
Post Partisan
Post Partisan

YTD LYTD based on max month from ytd

Hi 

i have an issue with a table with column Year,MonthNumber, Salesman and Sales 

and i want to obtain a  bar graph with top 10 salesman (after sales of maxyear YTD) - with 3 bars for yeach sales man - maxyear ytd, maxyear-1 ytd and maxyear-2 ytd

top 10 saleman after maxyear ytd

as ex the results have to be: list top 10 salesmen from 2019 sorted after sales and each have three bars - up 2019 jan, middle 2018 jan and bellow 2017 jan (for the data till jan 2019)

Thanks,

Cosmin

 

2 REPLIES 2
AlB
Super User
Super User

Hi @cosminc

 

Can you show some sample data and your expected result based on that? Otherwise it's a bit hard to help.

 

Please show your sample data in text-tabular format in addition to (or instead of) the screen captures. That allows people trying to help to readily copy the data and run a quick test. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix (beware of confidential data).  

Hi,

Thanks for your help

table is like this but multiply with oher names on salesman column; see also the graph

i need 2 graphs: 

1. year to date - 2019,2018 (not full, variable till maxmonth from maxyear) & 2017 (idem) bars (the years have to be obtained as maxyear and labeled as they are..2019,2018,2017, because is a dinamyc base); sorted years bars in this order and top 10 salesman after ytd data from 2019

2. monthly - last month data (max year-month), previous month and same month last year; same principle

many thanks,

Cosmin

 

YearMonthNoSalesmanSales
20191George80
20181George62
20182George74
20183George49
20184George28
20185George51
20186George73
20187George53
20188George75
20189George30
201810George98
201811George22
201812George97
20171George20
20172George42
20173George57
20174George24
20175George27
20176George41
20177George46
20178George19
20179George63
201710George28
201711George85
201712George74

ex.png

 

 

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.