Forum Discussion
Dax New Table Query Get the Minimum Value from a column
- Anonymous5 years ago
Hi vsslasd1
Your requirement is to return the Min Period from a filtered table. What is the data type of your Period column, text or date type? I see you use DATEVALUE function in your first dax code. DATEVALUE function is to convert text type value to date type. So I think your Period value's format looks like "2021/01/01".
What does "Current" mean in your filter ('WIP-ALL'[Period]<>"Current") ? If "Current" is the date value of today, you can use Today() function.
Sample:
You can build a measure to get the min period.
Measure = MINX(FILTER(ALL('WIP-ALL'),'WIP-ALL'[PERIOD]<>TODAY()),'WIP-ALL'[PERIOD])Result:
If you want to build a calcualted column, you can try this code.
Column = CALCULATE(MIN('WIP-ALL'[PERIOD]),FILTER('WIP-ALL','WIP-ALL'[PERIOD]<>TODAY()))Result:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vsslasd1 try this,
Test =
CALCULATE ( MIN ( Table[Period] ), ALL (), Table[Period] <> "Current" )
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
I almost wonder/think that it should be a LookupValue??