Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Broly
Frequent Visitor

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 

1 ACCEPTED SOLUTION
Bifinity_75
Solution Sage
Solution Sage

Hi @Broly , try this measure:

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

 

The result:

Bifinity_75_0-1668638198101.png

 

Best regards

View solution in original post

2 REPLIES 2
Broly
Frequent Visitor

thank you very much for your help ! 

Bifinity_75
Solution Sage
Solution Sage

Hi @Broly , try this measure:

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

 

The result:

Bifinity_75_0-1668638198101.png

 

Best regards

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.