Forum Discussion
Calculating accurate sales data
- Anonymous6 years ago
Anonymous
1. For the YTD you could try this following formula, if you only need Year 2020, you can add another year filter to the dax.YTD measure = CALCULATE(SUM('Table'[Sales]),DATESYTD('Table'[Date]))2. To get "-" when no selected you could create a measure. For example, this measure uses Isfiltered() to determine whether the company is filtered.
Measure = IF(ISFILTERED('Table'[Company]),[YTD measure],"-")
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
1. For the YTD you could try this following formula, if you only need Year 2020, you can add another year filter to the dax.
YTD measure = CALCULATE(SUM('Table'[Sales]),DATESYTD('Table'[Date]))
2. To get "-" when no selected you could create a measure. For example, this measure uses Isfiltered() to determine whether the company is filtered.
Measure = IF(ISFILTERED('Table'[Company]),[YTD measure],"-")
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Brilliant, thanks both!