Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello, need some help,
I have date table and sales table, they are connected through column Year+month. Relationship direction "Both" is for another calculations.
First date in Sales table is 2019 January, and in Date 2018- 01-01.
I need to find first date of sales table in measure, but I can't figure out how.
The result should be table visualization with columns:
Date[Year]/Date[Month]/First date of sales - 2019-01-01/Sales[EF Sales]
Can you help me?
This is pbix example https://drive.google.com/open?id=1ucr1iKxHayG1ckPt-B8aeTb9v3ZFbVnD
@Anonymous
You should have looked at the Date column in the Sales Table instead of the Date Table, and FIRSTDATE is used on Dates column, but the Sales[date] is a whole number data type.
In this case, you can use MIN to find the smallest date, and remember you can also use MIN on the Dates type columns.
First date = MINX(ALL(Sales),Sales[Date])
Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks, @V-pazhen-msft and @amitchandak
Maybe I didn't clarify enough the need.
In sales table I don't have date, I have combination of Year and month and it should bring first value of Date table.
And also in every line it should remain the same.
There is some picture, and example file is in previous message.
Thanks,
You can get min date like
First sales Date = minx(Sales,Sales[Sales Date])
If need you can format like = format(First sales Date = minx(Sales,Sales[Sales Date]),"YYYY-MM-DD")
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |