Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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?
User | Count |
---|---|
90 | |
74 | |
67 | |
63 | |
55 |
User | Count |
---|---|
102 | |
93 | |
73 | |
60 | |
59 |