Forum Discussion

Broly's avatar
Broly
Frequent Visitor
3 years ago
Solved

Text Value previous day

Hi,

 

I have a table with ID, a text (supply scheme) and a date column that comes from a Date table :

IDSupplySchemeDate
123ABC11/16/2022
1234ABC11/16/2022
12345ABC11/16/2022
123ABC11/15/2022
1234ABC11/15/2022
12345EFG11/15/2022

What I currently display is a table visual that shows today's data (just a filter onthe date column to only get today's data) like this :

 

IDSupplySchemeDate
123ABC11/16/2022
1234ABC11/16/2022
12345ABC11/16/2022

 

Now what I want is to know what was the supply scheme yesterday by creating a measure (I'm in live connection). So something like this : 

IDSupplySchemeDatesupplyscheme yesterday
123ABC11/16/2022ABC
1234ABC11/16/2022ABC
12345ABC11/16/2022EFG

 

Is there an simple way to achieve this ?

 

thanks in advance 

  • Hi Broly , try this measure:

    supplyscheme yesterday = CALCULATE(max(Table1[SupplyScheme]),
    FILTER(ALLEXCEPT(Table1,Table1[ID]),MAX(Table1[Date])-1))

     

    The result:

     

    Best regards

2 Replies

  • Hi Broly , try this measure:

    supplyscheme yesterday = CALCULATE(max(Table1[SupplyScheme]),
    FILTER(ALLEXCEPT(Table1,Table1[ID]),MAX(Table1[Date])-1))

     

    The result:

     

    Best regards