Forum Discussion
[Q] Dax Create new table via using DAX
I want to create new table (blue).
NewTable =
Var x1=Selectedvalue(TableA[Value])
RETURN
SUMMARIZE
(TableA, TableA[ID],"TYPE",
CALCULATE(LASTNONBLANK(TableA[TYPE],1),FILTER(TableA,TableA[Value]=x1)
))
Could you please save me !!
Are you trying to write a measure that will give your result in a table visual? Or a DAX Calculated Table? You've written a measure that uses a selectedvalue() which would not work for a calculated table. If you want a calculated table, you could just use the Return part of your measure (with "=1", not "=x1", i assume that is a typo).
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
3 Replies
- mahoneypat
Microsoft Employee
Are you trying to write a measure that will give your result in a table visual? Or a DAX Calculated Table? You've written a measure that uses a selectedvalue() which would not work for a calculated table. If you want a calculated table, you could just use the Return part of your measure (with "=1", not "=x1", i assume that is a typo).
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- ChoiJunghoon
Helper III
Thank you! you are right
NewTable =SUMMARIZE(TableA,TableA[ID],"TYPE",CALCULATE(LASTNONBLANK(TableA[Type],1),FILTER(TableA,TableA[Value]=MaX(TableA[Value]))))
- Ashish_Mathur
Super User