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
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.
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.
- 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