Forum Discussion
How to Create A Dynamic List from a String Column
- Anonymous1 year ago
Hi Tobz007 ,
Thanks to mickey64 and ryan_mayu for their quick replies. I have a DAX method to add:
(1) This is my table. It contains data for this month and last month.
(2) We can create a [Previous month] table.
Previous month = var _month=MONTH(MAXX(ALL('Table'),[Date]))-1 RETURN CALCULATETABLE(VALUES('Table'[Name]),FILTER('Table',MONTH([Date])=_month))(3) We can create a table and a status column.
Table 2 = VALUES('Table'[Name])Status = var _month=MONTH(MAXX(ALL('Table'),[Date])) var _table= CALCULATETABLE(VALUES('Table'[Name]),FILTER('Table',MONTH([Date])=_month)) var _table_a=EXCEPT('Previous month',_table) var _table_b=EXCEPT(_table,'Previous month') RETURN SWITCH(TRUE(), [Name] in _table_a,"A", [Name] in _table_b,"B", "C")Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Tobz007 ,
Thanks to mickey64 and ryan_mayu for their quick replies. I have a DAX method to add:
(1) This is my table. It contains data for this month and last month.
(2) We can create a [Previous month] table.
Previous month =
var _month=MONTH(MAXX(ALL('Table'),[Date]))-1
RETURN CALCULATETABLE(VALUES('Table'[Name]),FILTER('Table',MONTH([Date])=_month))
(3) We can create a table and a status column.
Table 2 = VALUES('Table'[Name])Status =
var _month=MONTH(MAXX(ALL('Table'),[Date]))
var _table= CALCULATETABLE(VALUES('Table'[Name]),FILTER('Table',MONTH([Date])=_month))
var _table_a=EXCEPT('Previous month',_table)
var _table_b=EXCEPT(_table,'Previous month')
RETURN SWITCH(TRUE(),
[Name] in _table_a,"A",
[Name] in _table_b,"B",
"C")
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks alot v-tangjie-msft, I did found a way around the solution using power query, but your feedback is quite helpful! Thanks again.