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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Specialist90
Frequent Visitor

MEASURE with condition using another table

Hello,

I need to create a MEASURE which sum all the Amounts lower than a certain date (like June 30, 2023) from TABLE 1, but dates in TABLE 1 are expressed in text, therefore I need to use the TABLE 2 where texts are associated with dates expressed as numbers.

Any help? 

 

TABLE 1

Amounts

Trade Date (text format)

 

TABLE 2

Trade Date (text format)

Date (number format)

Year

Month 

Days

1 ACCEPTED SOLUTION

Create a calculated column in Table 1 as:

My Date Number Format From Table 2 = RELATED ( 'Table 2'[Date] )

 

RELATED function (DAX) - DAX | Microsoft Learn

 

My Measure = CALCULATE ( SUM ( 'Table 1'[Amounts] ), 'Table 1'[My Date Number Format From Table 2] < 20230630 ) 




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





View solution in original post

5 REPLIES 5
ToddChitt
Super User
Super User

My Measure = CALCULATE ( SUM ( 'Table 1'[Amounts] ), RELATED ( 'Table 2'[Date] < "08/30/2023" ) )

If that doesn't work, you may need to create a calculated column using the RELATED funtion to bring the Date into Table 1




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Can you please just show the formula for this second case (related in calculated column)?

 

Thank you so much

Create a calculated column in Table 1 as:

My Date Number Format From Table 2 = RELATED ( 'Table 2'[Date] )

 

RELATED function (DAX) - DAX | Microsoft Learn

 

My Measure = CALCULATE ( SUM ( 'Table 1'[Amounts] ), 'Table 1'[My Date Number Format From Table 2] < 20230630 ) 




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





I just get this error when using the formulas above:

Specialist90_0-1693494624125.png

 

Ok just solved adding "Value" to the formula

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.