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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
RichHead1821
Resolver I
Resolver I

Calculate column with TRUE or FALSE values, according to values held in parent AND child table

Table 1 has ID and a date, and in this table I want to add a calculated column.
Table 2 is a child of table 1 (FK is table1.ID), has its own ID and has a text column. 

The calculated column is to be TRUE or FALSE according to the value of table1.date (>= 01/10/2021 & <= 30/11/2021) AND whether table2.text has values of "VALUE A" OR "VALUE B".
I've tried IF with LOOKUPVALUE etc... and get the (expected) "A table of multiple values was supplied where a single value was expected" error.

I cannot fathom which DAX function to use for this...

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@RichHead1821 , If you need a new column in table A

 

New column =

var _cnt = countx(filter(TableB, TableB[value] in {"VALUE A" , "VALUE B"}), [Value]) +0

return

if(_cnt >0 && Table1[Date] >= date(2021,10,01) && Table1[Date] <= date(2021,11,30), true(), false() )

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
RichHead1821
Resolver I
Resolver I

Perfect, thank you sir, also able to follow and understand.

amitchandak
Super User
Super User

@RichHead1821 , If you need a new column in table A

 

New column =

var _cnt = countx(filter(TableB, TableB[value] in {"VALUE A" , "VALUE B"}), [Value]) +0

return

if(_cnt >0 && Table1[Date] >= date(2021,10,01) && Table1[Date] <= date(2021,11,30), true(), false() )

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.