Forum Discussion
Dax Measure to return a single value from a column when using Min function on a different column
- 5 years ago
JamesCarter try this meaure
Top Ref = CALCULATE ( MIN ( Ref[Ref] ), TOPN ( 1, ALLSELECTED ( Ref ), Ref[Start Date], ASC ) )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.⚡
- 5 years ago
Hi,
Try these measures
First date = MIN(Data[Start Date])Measure = FIRSTNONBLANK ( TOPN ( 1, VALUES (Data[Ref]), [First date],ASC ), 1 )Drag the second measure to a card visual. The result will be 123456.
Hi,
Try these measures
First date = MIN(Data[Start Date])Measure = FIRSTNONBLANK ( TOPN ( 1, VALUES (Data[Ref]), [First date],ASC ), 1 )
Drag the second measure to a card visual. The result will be 123456.
Thanks Ashish,
Absolute superstar. That worked a treat.
I tweaked slightly to make the first measure a variable and I'm absolutely getting the result.
Brilliant stuff - very grateful. I'd been playing with FIRSTNONBLANK, MIN and TOPN but just couldn't get it - haven't used ASC before. That's a new string to the bow!
Thanks again
- Ashish_Mathur5 years agoSuper User
You are welcome.