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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Search for missing dates and values

Hello! 

 

 

For exampleFor exampleHow can I get the value from previous dates, if my column has more dates than other table?

1 ACCEPTED SOLUTION

Here it is,

I have named these 2 tables as A and B

 

First create a calculated column in the first Table shown in the Picture

DateKEY = A[Date]&A[KEY]

 

 

and then create another calculated column to get the revenue

Result=LOOKUPVALUE(A[Revenue],A[DateKEY],IF(ISBLANK(LOOKUPVALUE(A[Date],A[DateKEY],B[Date]&B[KEY])),CALCULATE(MAX(A[Date]),FILTER(A,A[Date]<EARLIER(B[Date]))),LOOKUPVALUE(A[Date],A[DateKEY],B[Date]&B[KEY]))&B[KEY])

View solution in original post

3 REPLIES 3
iamprajot
Responsive Resident
Responsive Resident

not sure what is it that you need from what is shown here.
Anonymous
Not applicable

Hello!Снимок.JPG

 

I need a column, where calculate 'revenue' by date, and key. If date is blank, I need previous value (revenue).

 

Thanx!

 

Here it is,

I have named these 2 tables as A and B

 

First create a calculated column in the first Table shown in the Picture

DateKEY = A[Date]&A[KEY]

 

 

and then create another calculated column to get the revenue

Result=LOOKUPVALUE(A[Revenue],A[DateKEY],IF(ISBLANK(LOOKUPVALUE(A[Date],A[DateKEY],B[Date]&B[KEY])),CALCULATE(MAX(A[Date]),FILTER(A,A[Date]<EARLIER(B[Date]))),LOOKUPVALUE(A[Date],A[DateKEY],B[Date]&B[KEY]))&B[KEY])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.