Forum Discussion
kalpesh07
2 years agoFrequent Visitor
DAX
Hi All, I need help with DAX Formula to calculate Market Share. I've Master Data which is very clean but is a combination of Value & Volume by Segment,Manufacturer, Brand at MONTH Level. - Basic...
- Anonymous2 years ago
HI kalpesh07,
Perhaps you can try to use the following measure formula if it suitable for your requirement:
formula = DIVIDE ( SUM ( MarketData[Sales Value] ), CALCULATE ( SUM ( MarketData[Sales Value] ), ALLSELECTED ( MarketData ), VALUES ( MarketData[SEGMENT] ), VALUES ( 'Calendar'[Date] ) ), 0 )Regards,
Xiaoxin Sheng
kalpesh07
2 years agoFrequent Visitor
Hi rajendraongole1
No this is not working! I've a seperate calendar table. I've used related function.
=
DIVIDE(
SUM(MarketData[Sales Value]),
CALCULATE(
SUM(MarketData[Sales Value]),
FILTER(
ALLSELECTED(MarketData),
MarketData[SEGMENT] = MAX(MarketData[SEGMENT]) &&RELATED('Calendar'[Date])
= MAX('Calendar'[Date])
)
),
0
)