Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Showing Data Until Specific Date

Hello everybody,

 

I`m having trouble with a bar chart where I show my production that was planned and my production that was made

the problem is that I'll only have my production made from previously days, but my planned production I have for each day of the month already. So how can I show my planned production until TODAY()-1? I tried to do :

CALCULATE(Sum(DadosProd[Produção Planejada A]);DateTable[Date]<TODAY()))
but that didn't work out.
  • Hi EduardoPach

     

    you can try this:

    CALCULATE(Sum(DadosProd[Produção Planejada A]);FILTER(DateTable;DateTable[Date]<TODAY()))

2 Replies

  • R_H's avatar
    R_H
    Regular Visitor

    Hi EduardoPach

     

    you can try this:

    CALCULATE(Sum(DadosProd[Produção Planejada A]);FILTER(DateTable;DateTable[Date]<TODAY()))

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Anonymous ,

     

    To make the dax formula work, you need to make sure there's relationship between 'DadosProd' and 'DateTable', for example, 'DateTable' and 'DadosProd' is one - many relationship based on the date column and the direction is from 'DateTable' to 'DadosProd'.

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.