Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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.
User | Count |
---|---|
121 | |
69 | |
66 | |
56 | |
52 |
User | Count |
---|---|
181 | |
85 | |
67 | |
61 | |
53 |