Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I need some help on this please.
I used a measure called firstOrderDate to calculate the very first order date for each customer it works fine in the first table visual but when I add orderdate column into the second table visual how can I still only show the earliest date and leave the other dates blank for each customer? Thanks.
Solved! Go to Solution.
HI @McFLY
First Order Date =
VAR a =
CALCULATE (
MIN ( FactSales[OrderDate] ),
FILTER (
ALL ( DimCustomer ),
DimCustomer[FullName]
= MAX ( DimCustomer[FullName] )
)
)
RETURN
IF (
MAX ( FactSales[OrderDate] ) = a,
a,
BLANK ()
)
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
[First Order Date] =
IF( HASONEVALUE( DimCustomer[FullName] ),
CALCULATE(
MIN( FactSales[OrderDate] ),
ALL( FactSales ),
VALUES( DimCustomer[FullName] )
)
)
This code will return the very first order date for any single customer regardless of any other filters that might have been put on any tables.
Best
D
HI @McFLY
First Order Date =
VAR a =
CALCULATE (
MIN ( FactSales[OrderDate] ),
FILTER (
ALL ( DimCustomer ),
DimCustomer[FullName]
= MAX ( DimCustomer[FullName] )
)
)
RETURN
IF (
MAX ( FactSales[OrderDate] ) = a,
a,
BLANK ()
)
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Hi @McFLY ,
If this solution helps, please mark it as Solved.
Will help others in the community.
Thanks
Harsh Nathani
Hello @McFLY
What do you mean by leave oter dates blank for each customer? Can you show the sample expected results?
Cheers!
Vivek
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter
Thank you for your reply.
I mean the third column firstOrderDate in second table I want to always show the earliest date for each customer only.
For example:
Aaron Collins 2011/1/25 0:00:00 2011/1/25 0:00:00
Aaron Collins 2013/11/16 0:00:00 blank
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |