Forum Discussion
Matching transactions across multiple tables
- 7 years ago
Hi,
Enter this formula there
=if(ISNUMBER(CALCULATE(COUNTROWS(travel),FILTER(travel,travel[trip date from]<=EARLIER(card_expenses[Transaction Date])&&travel[trip date to]>=EARLIER(card_expenses[Transaction Date])&&travel[Traveller ID]=EARLIER(card_expenses[Employee id])))),"Travel status","Not in travel status")
Hi,
Here's the result i got without building any relationships. Download the Excel file from here.
Hope this helps.
- Phil-osophy7 years agoHelper I
Thank you Ashish_Mathur !
Would you know how to create a formula that would work with the relationships seeing as that is what i have in my actual power BI file because my dataset is significantly larger than what i shared?
thanks!
- Ashish_Mathur7 years agoSuper User
Hi,
My formula should work even if you build relationships between the tables.
- Phil-osophy7 years agoHelper I
Hi Ashish_Mathur,
i dont believe that is the correct excel file link as i dont see any formula included. it seems to be the same excel files i shared.
- Ashish_Mathur7 years agoSuper User
Hi,
Go to PowerPivot > Manage.
- Phil-osophy7 years agoHelper I
thank you!
do you know if there is any way to output something similar to what i had in my formula (if the expense took place during travel dates, the output is '' travel status'', otherwise if it took place outside of travel dates the output is ''not in travel status'')?