Forum Discussion
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
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
4 Replies
- Nathaniel_CCommunity Champion
- amitchandakSuper 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- JulianvesgaFrequent Visitor
OMG...it worked...it worked perfect ... the symbol of < I corrected it.
thank you
- JulianvesgaFrequent Visitor
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.