Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I need to create a measure that returns the smallest "CostID" value for each distinct ID and ignores all other values.
CostID represents the order start date in this case, and there is no separate start date in the data model. In the chart, the X-axis should display the year and month, while the Y-axis should show the order date based on this measure.
In this case, there are 2 orders with start dates of 2020-01 and 2020-03.
Is that possible?
Solved! Go to Solution.
Hi, @Tiitti7
Based on your information, I create a sample table:
Then create new measure and try the following DAX:
SmallestCostID =
CALCULATE(
MIN('Table'[CostID]),
ALLEXCEPT('Table', 'Table'[ID])
)
Create visual and put this measure in it, here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Tiitti7
Based on your information, I create a sample table:
Then create new measure and try the following DAX:
SmallestCostID =
CALCULATE(
MIN('Table'[CostID]),
ALLEXCEPT('Table', 'Table'[ID])
)
Create visual and put this measure in it, here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Tiitti7 , Try using ALLEXCEPT
MinCostID =
CALCULATE(
MIN(Table[CostID]),
ALLEXCEPT(Table, Table[ID])
)
Proud to be a Super User! |
|
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |