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
TVARELA
New Member

RESULTS FROM ANOTHER TABLE

Hello all,

I want to do this calculated column: Reservations_with_card = If(stay_date < Action_date, "No_card,"with_card")
I have 2 tables:

First_table: Stay_data/Cod_client

Second_table: Action_date/Cod_client

Howerver i have repeted clients in both table (i don't know if that is an issue)

How can i have a result like this:

Cod_client/stay_date/"with_card"

Cod_client/stay_date/"no_card"

Cod_client/stay_date/"no_card"

Cod_client/stay_date/"with_card"

...

Thanks for your help

Tiago

2 ACCEPTED SOLUTIONS

Table A

Stay DateHotelCod_cliente
01/01/2023XXX123456
01/01/2023XXX321654
02/01/2023XXX564231
02/01/2023XXX357951

 

Table B

Action dateCod clientCard name
03/01/2023123456star
03/01/2023321654star
25/12/2022 564231star
25/12/2022357951premium

 

Result table i need

Stay dateCod clientWith/whitout card
01/01/2023123456whitout card
01/01/2023321654whitout card
02/01/2023564231whith card
02/01/2023357951whith card

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Table A

Stay DateHotelCod_cliente
01/01/2023XXX123456
01/01/2023XXX321654
02/01/2023XXX564231
02/01/2023XXX357951

 

Table B

Action dateCod clientCard name
03/01/2023123456star
03/01/2023321654star
25/12/2022 564231star
25/12/2022357951premium

 

Result table i need

Stay dateCod clientWith/whitout card
01/01/2023123456whitout card
01/01/2023321654whitout card
02/01/2023564231whith card
02/01/2023357951whith card

lbendlin_0-1680835881896.png

 

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.