Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calculating accurate sales data

Hi everyone,    Happy Friday!   I have a table with a list of accounts. When someone selects an account datacards update to that particular account's information.    If no data is selected on t...
  • Anonymous's avatar
    Anonymous
    6 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.