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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Julianvesga
Frequent Visitor

Get a result from 2 condition and 2 different table

hi Team

my question is how i can get a resul from 2 conditions, bellow have a Table Mapping thta is the guia to know what is the cutofftime by process and the second table is my daiy table that a have to setup with de COT by TRX (transaction). 

 

 

 

table MappinG

Country       Subproceso     COT (cutofftime)

CO                      1                           14:00   

BH                      1                           14:00

CO                      2                           18:00  

GU                      3                           17:00

BH                      2                           16:00

CO                     3                            21:00   

 

TABLE2

Trx        Country          Subproucto    COT

1A            CO                     1                 (The result is 14:00)

2A            CO                     2

6A            CO                     3

3A            BH                     3

4A            BH                     3

5A             GU                    3 

 

Please i need you urgent help....in excel works perfectly with index and match but in power bi dax i dont have idea how works.

 

best regards

 

 

Julian Vesga

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Please create a column not Measure

 

COT Column = maxx( filter(MappinG,MappinG[Country]=TABLE2[Country] 
&& TABLE2[Subproucto]>=MappinG[Subproucto]),MappinG[COT])

Do table name swap if needed in the filter clause.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

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

4 REPLIES 4
amitchandak
Super User
Super User

Please create a column not Measure

 

COT Column = maxx( filter(MappinG,MappinG[Country]=TABLE2[Country] 
&& TABLE2[Subproucto]>=MappinG[Subproucto]),MappinG[COT])

Do table name swap if needed in the filter clause.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

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

OMG...it worked...it worked perfect ... the symbol of < I corrected it.

thank you

 

Hi, what about if i have 3 condition, for example to the table Mapping add a column denominate Product. is the same to he previous example but with 3 conditions.

 

this is my idea, but dont work: Table 1 = COT    Table 2= Citidocs DB

SystemCOT = maxx( filter('COT','COT'[COUNTRY]='Citidocs DB'[Country ID]
&& 'COT'[Product]='Citidocs DB'[Product.] && 'Citidocs DB'[SubProDes]='COT'[SubProDes]),'COT'[COT])

 

 

i hope oyu can help me.

Nathaniel_C
Community Champion
Community Champion

Hi @Julianvesga ,

Would you post what you expect to receive in your outcome?

Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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