I have Top N Products listed in the Table as it shows in the picture , My Problem in the Sale % measure I want it to be dynamic to reflect the caculation of (%) of total (In card) either from (Week Date) or (Category ) Or Both of them , How can I do this ?
I did Filter top 3 products with a row for others please refer to the following link:
My Question is if I need to pass any of the product names in the TopN table to another report, how can I pass it to the column (Product Name) in The Product table in the Drill through report?
You need to pass the second argument as well: Week Number = WEEKNUM(‘Date’[Date], 2)
Next I added this column to the Date table: WeeknYear = ‘Date’[Year] * 100 + ‘Date’[Week Number]
Ok @Melissa Now it works , I forget to put 2 (in Weeknum function) which means Start on Monday but I have some question Our country the Business week start on (Sunday) how can we align it with this case (Week start in Sunday)?
Just to make sure I understan the case correctly , shall I edit the current Date (calendar) table with the (M-Query) same as inside the link you mentioned it on the previous post?
You’ve said your weeks start on Sunday and in an ISO 8601 calendar weeks start on Monday - so this is not an appropriate date table for your needs but does illustrate how you can set up a date table that meets your requirements.
If you need help setting up an appropriate date table, please create a new topic and clearly state your week logic requirements.
hi @Melissa
I set back everything as you recommeds :
Week Number = WEEKNUM(‘Dates’[Date],2)
Week Start Date =
Dates[Date]-WEEKDAY(‘Dates’[Date],2)
WeeknYear = ‘Dates’[Year] * 100 + ‘Dates’[Week Number]
This “problem” will persist until you incorporate logic in your calendar to deal with that.
Please take some time to examine the Extended Date table, you will notice that days belonging to a certain calendar year can be assigned to a week number in another year.
That solves this “issue” and note that this is an ISO 8601 type date table, so you have to design week number logic around the year start and end that meet your business requirements.
If you need assistance, create a new topic with all week logic requirements accompanied by a file and examples