Forum Discussion
Tracking a product with launch date given country selected and non selected.
Hi Community,
I am working on a Launch Tracker of products where I have data on their launch date, and sales, along with the current month and the countries where they have launched. I want to show the launch of the product from the earliest date in the launch when no country is selected. and when the country is selected I want to show the launch date from that specific launch date of the product in that country and there are multiple products in the data. The launch date is different for different products but it should show month tracking from the 1st month as shown below.
I was able to create the launch of the product irrespective of the country by ranking the products on the launch date and appended zero values in rank to distinct products so it shows the products have started from zero.
No. of Months since launch
Please let me know your suggestions on how I can get the launch of products in a country when a country is selected.
Thank you in advance 🙂
3 Replies
- lbendlin
Super User
Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- Piyush_Ghungrud
Helper I
Product Country Month Val Launch Date RANKing Group rank Test Product x France 2021-06 0 6 0 0 Product x France 2021-07 0 7 0 0 Product x France 2021-08 0 8 0 0 Product x France 2021-09 0 9 0 0 Product x France 2021-10 0 10 0 0 Product x France 2021-11 0 11 0 0 Product x France 2021-12 0 12 0 0 Product x France 2022-01 0 13 0 0 Product x France 2022-02 0 14 0 0 Product x France 2022-03 0 15 0 0 Product x France 2022-04 0 16 0 0 Product x France 2022-05 0 17 0 0 Product x France 2022-06 0 18 0 0 Product x Germany 2021-03 0 3 0 0 Product x Germany 2021-04 0 4 0 0 Product x Germany 2021-05 0 5 0 0 Product x Germany 2021-06 0 6 0 0 Product x Germany 2021-07 0 7 0 0 Product x Germany 2021-08 0 8 0 0 Product x Germany 2021-09 0 9 0 0 Product x Germany 2021-10 0 10 0 0 Product x Germany 2021-11 0 11 0 0 Product x Germany 2021-12 0 12 0 0 Product y France 2020-07 90 2019-01 1 1 Product y France 2020-08 68 2019-01 2 2 Product y France 2020-09 5 2019-01 3 3 1. RANKing Group = RANKX(FILTER('Data','Data'[Product] = EARLIER('Data'[Product])),'Data'[Month],,ASC,Dense)2. Test = IF(Data[rank]="0",0,Data[RANKing Group])Please find the sample data and formulas that I used to get up to this result.Thank you 🙂 - Piyush_Ghungrud
Helper I
Remaining Data :
Product y France 2020-10 74 2019-01 4 4 Product y France 2020-11 74 2019-01 5 5 Product y France 2020-12 27 2019-01 6 6 Product x France 2021-01 8 2021-01 1 1 Product x France 2021-02 5 2021-01 2 2 Product x France 2021-03 96 2021-01 3 3 Product x France 2021-04 98 2021-01 4 4 Product x France 2021-05 92 2021-01 5 5 Product x France 2021-06 42 2021-01 6 6 Product x France 2021-07 52 2021-01 7 7 Product x France 2021-08 16 2021-01 8 8 Product x France 2021-09 48 2021-01 9 9 Product x France 2021-10 21 2021-01 10 10 Product x France 2021-11 95 2021-01 11 11 Product x France 2021-12 9 2021-01 12 12 Product x France 2022-01 2 2021-01 13 13 Product x France 2022-02 81 2021-01 14 14 Product x France 2022-03 40 2021-01 15 15 Product x France 2022-04 22 2021-01 16 16 Product x France 2022-05 64 2021-01 17 17 Product x France 2022-06 88 2021-01 18 18 Product x Germany 2021-03 61 2021-03 3 3 Product x Germany 2021-04 49 2021-03 4 4 Product x Germany 2021-05 68 2021-03 5 5 Product x Germany 2021-06 20 2021-03 6 6 Product x Germany 2021-07 1 2021-03 7 7 Product x Germany 2021-08 19 2021-03 8 8 Product x Germany 2021-09 37 2021-03 9 9 Product x Germany 2021-10 55 2021-03 10 10 Product x Germany 2021-11 87 2021-03 11 11 Product x Germany 2021-12 79 2021-03 12 12 Product x Germany 2022-01 33 2021-03 13 13 Product x Germany 2022-02 60 2021-03 14 14 Product x Germany 2022-03 12 2021-03 15 15 Product x Germany 2022-04 94 2021-03 16 16 Product x Germany 2022-05 82 2021-03 17 17 Product x Germany 2022-06 73 2021-03 18 18 Product z France 2021-04 90 2021-04 1 1 Product z France 2021-05 9 2021-04 2 2 Product z France 2021-06 22 2021-04 3 3 Product z France 2021-07 38 2021-04 4 4 Product z France 2021-08 42 2021-04 5 5 Product z France 2021-09 72 2021-04 6 6 Product z France 2021-10 83 2021-04 7 7 Product z France 2021-11 71 2021-04 8 8 Product z France 2021-12 38 2021-04 9 9 Product z France 2022-01 69 2021-04 10 10 Product z France 2022-02 74 2021-04 11 11 Product z France 2022-03 91 2021-04 12 12 Product z France 2022-04 54 2021-04 13 13 Product z France 2022-05 79 2021-04 14 14 Product z France 2022-06 45 2021-04 15 15 Product z Germany 2021-04 25 2021-04 1 1 Product z Germany 2021-05 61 2021-04 2 2 Thank you 🙂