cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
joshua1990
Post Prodigy
Post Prodigy

TOP 10 Sales for current week

I have 3 Tables in the data model that are linked.

The first one is a simple calendar table:

Year-WeekWeek Offset
2021-46-1
2021-470

This table shows me in the column [Week Offset] the current week at value '0'.

 

Then I have an attribute table that shows me the Department for each Article.

DepartmentArticle
AAA1
BBB1

 

And then I have a sales table that shows me sales for each article for each store:

ArticleStoreSalesYear-Week
A1AA-015502021-47
A1AA-024002021-47

 

Now I would like to get a matrix that shows me the TOP 10 Sales overall for the current week:

ArticleStoreSales
A1AA-01550
A1AA-02400

 

The TOP 10 sales should consider just the sum on the article level, not on the Store level. But in the matrix, the result should be shown at the store level.

How would you do that?

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@joshua1990 , Created a measure like M1 and try to create Rank on that

 


M1= calculate(sum(Table[sales]), allexcept(Table, Table[Article]))

 

Rank = rankx(allselected(Table[Article]), [M1],,desc, dense)

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@joshua1990 , Created a measure like M1 and try to create Rank on that

 


M1= calculate(sum(Table[sales]), allexcept(Table, Table[Article]))

 

Rank = rankx(allselected(Table[Article]), [M1],,desc, dense)

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors