March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Dear Community
I have an issue with a query and i could need some help:
I have a table (Table A) with merchants that have registered on a specific date. These merchants have a unique ID and a Creation date.
Now i have a second table (Table B) where i track the transactions of these Merchants with the unique ID.
I need a query where i can compare the date when they were created and when they did their first transaction. I would imagine in something like a new column in Table A which checks in Table B if the Unique ID is there and then returns the first "Date" entry it found)
Table A:
Table B:
As you can see in Table B "978193" is in there twice because he did a transaction in week 1 and 2. Now i would need to know, fro Table A when he was created and when he did his first transaction.
If he was created and never did any transaction, the return value would be "No transactions done"
Can yo help me with that?
Thank you so much and best regards
Solved! Go to Solution.
For your reference.
Step 0: I use these data tables.
Table A:
Topnode Number VP Create date
955758 08/01/2021
960651 21/01/2021
962197 26/01/2021
963128 27/01/2021
964017 30/01/2021
964497 02/02/2021
964743 02/02/2021
965216 03/02/2021
965605 04/02/2021
969300 15/02/2021
969578 16/02/2021
970595 18/02/2021
978193 23/03/2021
980164 07/05/2021
1143077 12/08/2021
1111255 30/09/2021
1129074 13/10/2021
Table B:
Month Week All Topnodes
1.2022 1.2022 970595
1.2022 1.2002 978193
1.2022 2.2002 978193
1.2022 2.2002 980164
1.2022 2.2002 1143077
1.2022 3.2022 978193
1.2022 3.2022 1111255
1.2022 3.2022 1129074
1.2022 4.2002 970595
1.2022 4.2002 978193
1.2022 4.2002 980164
Step 1: I add a relationship.
Step 2: I make a measure.
Min Week = MIN('Table B'[Week])
Step 3: I make a matrix.
For your reference.
Step 0: I use these data tables.
Table A:
Topnode Number VP Create date
955758 08/01/2021
960651 21/01/2021
962197 26/01/2021
963128 27/01/2021
964017 30/01/2021
964497 02/02/2021
964743 02/02/2021
965216 03/02/2021
965605 04/02/2021
969300 15/02/2021
969578 16/02/2021
970595 18/02/2021
978193 23/03/2021
980164 07/05/2021
1143077 12/08/2021
1111255 30/09/2021
1129074 13/10/2021
Table B:
Month Week All Topnodes
1.2022 1.2022 970595
1.2022 1.2002 978193
1.2022 2.2002 978193
1.2022 2.2002 980164
1.2022 2.2002 1143077
1.2022 3.2022 978193
1.2022 3.2022 1111255
1.2022 3.2022 1129074
1.2022 4.2002 970595
1.2022 4.2002 978193
1.2022 4.2002 980164
Step 1: I add a relationship.
Step 2: I make a measure.
Min Week = MIN('Table B'[Week])
Step 3: I make a matrix.
Thats great, i forgot to mention that i already had a relationship, so i couldnt connect them this way but i circumvented this with a "SUMMARIZE" Table and linked it like you mentioned. Worked like a charm
Best of thanks
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |