Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

The TREATAS Function

Hi, I see alot of examples of TREATAS, with calculations,  but I'm trying to get a specific value from a table.
How would I get the date below, using the TREATAS function?   I see the function used for calculations and it works great for me, but not for just pulling out data from a specific record.

if it can't be done what would be an alternative?  The tables are not linked and they won't be.
Thanks.

StevenT_0-1647522916092.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks Paul. I'll give it a try.  I had trouble with the first portion of the TREATAS function.
In the first portion, the MAX(WIP Data[Epic Actual Start Date])
I see that's how you get a single record.  Thank you!

View solution in original post

7 REPLIES 7
PaulDBrown
Community Champion
Community Champion

Try:

epic start date = CALCULATE(MAX(WIP Data[Epic Actual Start Date]), TREATAS(VALUES(Rally Epics[Formatted ID]), WIP Data[Epic ID]))





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

Thanks Paul. I'll give it a try.  I had trouble with the first portion of the TREATAS function.
In the first portion, the MAX(WIP Data[Epic Actual Start Date])
I see that's how you get a single record.  Thank you!

bcdobbs
Super User
Super User

Not 100% sure how you want to materialise the "answer" but something like this:

VAR SelectedFomattedID = VALUES( RallyEpics[Formatted ID] )

VAR Result =
	CALCULATE (
		SELECTEDVALUE ( 'WIP Data'[Epic Actual Start Date], "More than one value" ),
		TREATAS ( SelectedFormattedID, 'WIP Data'[Epic ID] )
		)

RETURN Result


Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Anonymous
Not applicable

bcdobbs, that was exactly what i want to do. I was a bit confused because of the initial portion of the TREATAS functionality. But that basically worked!


Anonymous
Not applicable

whatever value is in this field, i want to show the value.
In the function lookupValue you can do a lookup . I'm looking to do the same thing with TreatAs.  

Does that help?



StevenT_0-1647542033939.png

 




Anonymous
Not applicable

Hi , amitchandak.  I want to get whatever value is in the Epic Actual Start Date. Something like a lookup.
Every example of Treatas I've seen, uses a calculation
But what if you just want to get the value in a specific field?



amitchandak
Super User
Super User

@Anonymous , Treatas will allow you filter the column across table.

 

Can you explain what do mean by get the date

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.