Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
Hi!
I have 2 tables including Product ID / Product / Sold date (1 / 2). These tables have 1:1 relationship based on Product ID. I would like to build up a table visual including Product ID / Product / First sold date (comparing sold date of Table1 & Table2).
I would like to get the below result (TableOveral):
Could you please advise a DAX formula to solve this?
Thanks in advance!
Solved! Go to Solution.
pls try this
Measure =
VAR _date1 = MAX('Table1'[Sold datel])
VAR _date2 = MAX('Table2'[Sold date_2])
RETURN
SWITCH( TRUE(),
ISBLANK(_date1) ,_date2,
ISBLANK(_date2), _date1 ,
MINX({MIN('Table1'[Sold datel]),MIN('Table2'[Sold date_2])},[Value]))
Hi,
Enausre that the 3 columns are spelled the same way in both tables. In the Query Editor, append the 2 tables. Create your visual from the appended table. Write this measure
First date = min(appendedtable[Date])
Hope this helps.
or you can wirt this
Thanks. It is almost perfect, but there are some rows when only one of the tables contains sold date, in the other table it is emtpy (so its value is 0). In that case, overall table should contain the existing date, not 0.
pls try this
Measure =
VAR _date1 = MAX('Table1'[Sold datel])
VAR _date2 = MAX('Table2'[Sold date_2])
RETURN
SWITCH( TRUE(),
ISBLANK(_date1) ,_date2,
ISBLANK(_date2), _date1 ,
MINX({MIN('Table1'[Sold datel]),MIN('Table2'[Sold date_2])},[Value]))
Thanks, but finally a managed to solve it with the following calculated column in Table1:
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
74 | |
70 | |
70 | |
45 | |
41 |
User | Count |
---|---|
48 | |
47 | |
29 | |
28 | |
28 |