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.
Thankou a lot v-janeyg-msft but that doesn't solve the problem.
Models I selected are not competing against each others during the month. Total of MS should be 100% each month if I calculate it by hand and it's not.
And if for exemple I select only one brand it will show 100% each month because it's not competeing against other during the month. I don't know if you get the logic.
Thankyou
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.
- likmalik5 years ago
Helper I
Thankyou v-janeyg-msft is it possible to send me the pbix because I struggle to modify the measure ?
- v-janeyg-msft5 years ago
Community Support
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
- likmalik5 years ago
Helper I
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.