Forum Discussion
Calculate Marketshare over 12months.
- 5 years ago
Hi, likmalik
You can modify the measure:Add [Date]=SELECTEDVALUE(Sheet1[Date])
VAR total = SUMX ( FILTER ( ALLSELECTED ( Sheet1 ), [Date] >= startdate && [Date] <= enddate&& [Date]=SELECTEDVALUE(Sheet1[Date]) ), [Sales numbers] ) VAR single = SUMX ( FILTER ( Sheet1, [Date] >= startdate && [Date] <= enddate && [Model] = SELECTEDVALUE ( Sheet1[Model] ) &&[Date]=SELECTEDVALUE(Sheet1[Date]) ), [Sales numbers] )Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, likmalik
I shared the sample In the reply above,You can download and only modify two variables in my old measure.
Best Regards
Janey Guo
It works thank you so much!
4 days that I tried on different forums but no-one was able to help me. You are the king of powerBI.
- v-janeyg-msft5 years ago
Community Support
Hi, likmalik
Glad to help you. If I can get kudos, I will also be very happy.😁
Best Regards
Janey Guo
- likmalik5 years ago
Helper I
Done v-janeyg-msft ! Last question : How do you generate the tables (End Month, End year, Start Month Start Year) because I'm trying to integrate your solution into my main file not the sample file I gave you and if I only copy the measure it says that tables are missing.
- v-janeyg-msft5 years ago
Community Support
Hi, likmalik
You can learn the function first:Use what-if parameters to visualize variables - Power BI | Microsoft Docs
Best Regards
Janey Guo