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.
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?
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 |
---|---|
102 | |
101 | |
78 | |
70 | |
63 |
User | Count |
---|---|
140 | |
106 | |
100 | |
83 | |
73 |