The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Fam,
I have a situation whereby our order ids are alpha-numeric and it is not arranged alphabetically, it is a unique random order id. I need to extract the earliest order id based on the pickup date.
I am creating a column in my customer's table and I am pulling the data from my order's table.
I used DAX:
CALCULATE ( MINX ( order_alpha_id))
But I realized that I am pulling up the order id based on the letters not the pickup date.
Solved! Go to Solution.
@Andrew_na_lang Any way you can post sample data?
Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
@Andrew_na_lang Try:
Measure =
VAR __MinDate = MINX(ALL('Table'),[Pickup Date])
VAR __OrderID = MINX(FILTER(ALL('Table'),[Pickup Date] = __MinDate),[order_alpha_id])
RETURN
__OrderID
@Greg_Deckler
Thanks for the response.
For some reason, it didn't work.
I created a calculated column in my customer table.
@Andrew_na_lang Any way you can post sample data?
Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
@Greg_Deckler it worked! Thank you. I have a different question now though. can you help
@Andrew_na_lang IDK, maybe?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
261 | |
120 | |
113 | |
83 | |
71 |