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.
To some this must be rudimentary Power BI, I've crom from tableau where I understood table calcs muhc easier than I understand Calculate. If i could crack this nut wihtout having to add more fields to a table it'd be swell
I have a table with hundreds of ID's, Types and Dates. I have a number of calcs to build but if I can sort this one I'm confident I can build the rest. I want the earliest date, per ID, when the Type is 1.
Sample data
ID | Type | Date |
ABC123 | 1 | 1/01/2024 |
ABC123 | 1 | 2/05/2024 |
ABC123 | 2 | 3/06/2024 |
DEF456 | 3 | 4/01/2024 |
DEF456 | 1 | 5/01/2024 |
DEF456 | 1 | 6/03/2024 |
GHI789 | 3 | 7/01/2024 |
GHI789 | 2 | 8/06/2024 |
GHI789 | 1 | 9/01/2024 |
I want a measure that returns
ABC123 | 1/01/2024 |
DEF456 | 5/01/2024 |
GHI789 | 9/01/2024 |
Thanks in advance
Solved! Go to Solution.
Thanks for the replies from Ritaf1983 and muhammad_786_1.
Hi @analyst_guy ,
Based on the description of your problem, I realized your needs by creating the following measure:
EarliestDate = CALCULATE(MIN('Table'[Date]),ALLEXCEPT('Table', 'Table'[ID]))
The result is as follows:
Best Regards,
Zhu
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the replies from Ritaf1983 and muhammad_786_1.
Hi @analyst_guy ,
Based on the description of your problem, I realized your needs by creating the following measure:
EarliestDate = CALCULATE(MIN('Table'[Date]),ALLEXCEPT('Table', 'Table'[ID]))
The result is as follows:
Best Regards,
Zhu
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @analyst_guy
You can use this measure to get the Earliest date.
EarliestDate =
CALCULATE(
MIN('Table'[Date]),
'Table'[Type] = 1
)
Best Regards,
Muhammad Yousaf
If this post helps, then please consider "Accept it as the solution" to help the other members find it more quickly.
thank you, but I need the measure to work across each ID as well. I need to use this measure as a calc in subsequent calculations, and wihtout have to write ID = DEF456
the measure should just have a date returned, thank you
Hi @analyst_guy
Just to make sure that I understood you correctly, the desired result is a concatenated string in this format:
ABC1231/01/2024?
Or just the earliest date?
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 |
---|---|
83 | |
75 | |
64 | |
39 | |
34 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |