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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Gopal30
Helper I
Helper I

Value from 2 tables based on Date

Hello Everyone,

 Ok, i have a very naive doubt. Following is the elaboration:

 

I have value [Quantity] from table 1 and value  [Quantity] from table 2 and i want to show these values in the matrix with the following condition. 

 

If date<= today, table2[value] ,

else table1[value]

 

and i am clueless about the exact formula that can help me achieve this.

 

Thanks in advance!

 

Cheers!

 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Gopal30 

Please see the below.

Measure = 
IF( 
    MAX( 'Calendar'[Date] ) <= TODAY(), 
    SUM( table2[Quantity] ),
    SUM( table1[Quantity] )
)

Regards,
Mariusz

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

View solution in original post

2 REPLIES 2
Mariusz
Community Champion
Community Champion

Hi @Gopal30 

Please see the below.

Measure = 
IF( 
    MAX( 'Calendar'[Date] ) <= TODAY(), 
    SUM( table2[Quantity] ),
    SUM( table1[Quantity] )
)

Regards,
Mariusz

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

@Mariusz  Thanks a lot! 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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