Forum Discussion
Jouni900
3 years agoFrequent Visitor
YTD including only unique values
Hi, I have a following goal in which I am seeking a solution I have sales data on a product-day level from which the data is aggregated to monthly level. I have campaign and new product sales...
Kishore_KVN
3 years agoSolution Sage
Please create one column and a measure.
Column DAX will be as below:
Unique Values =
Var MonthCount = CALCULATE(COUNT('Table'[Month]),ALLEXCEPT('Table','Table'[Month]))
Return
IF(MonthCount=1,'Table'[FCST],'Table'[FCST]/MonthCount)Output looks like this:
Then create YTD Measure:
YTD =
CALCULATE(SUM('Table'[Unique Values]),DATESYTD('Table'[Date]))Output in the report looks like this:
Jouni900 If this post helps, then please consider accepting it as the solution to help other members find it more quickly.THANK YOU!!