Forum Discussion
Snowy34
Helper III
2 years agoRebuild data table
Good afternoon Team, I'm looking for help rebuilding this user info data table, long story short, I have a table that holds users' training status, I need a visualisation to tell me who has done ...
- Anonymous2 years ago
Hi Snowy34 ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a tbale.
Table 2 = UNION(VALUES('Table'[status]),{"Status"})(3) We can create measures.
Measure = COUNTROWS(FILTER('Table','Table'[status]=MAX('Table 2'[status])))Measure 2 = SWITCH(TRUE(), CALCULATE(COUNT('Table'[status]),FILTER(ALLSELECTED('Table'),'Table'[User]=MAX('Table'[User]) && 'Table'[status]="Item revoked"))>=1,"Item revoked", CALCULATE(COUNT('Table'[status]),FILTER(ALLSELECTED('Table'),'Table'[User]=MAX('Table'[User]) &&'Table'[status]="competent"))>=1,"competent", "not yet competent")Measure 3 = var _table=SUMMARIZE(ALL('Table'),[User],"sta",[Measure 2]) var _a=MAXX(FILTER(_table,[User] in VALUES('Table'[User])),[sta]) return IF(MAX('Table 2'[status])="Status",_a,[Measure])(3) Then the result is as follows.
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.
Anonymous
2 years agoNot applicable
Hi Snowy34 ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a tbale.
Table 2 = UNION(VALUES('Table'[status]),{"Status"})
(3) We can create measures.
Measure = COUNTROWS(FILTER('Table','Table'[status]=MAX('Table 2'[status])))Measure 2 =
SWITCH(TRUE(),
CALCULATE(COUNT('Table'[status]),FILTER(ALLSELECTED('Table'),'Table'[User]=MAX('Table'[User]) && 'Table'[status]="Item revoked"))>=1,"Item revoked",
CALCULATE(COUNT('Table'[status]),FILTER(ALLSELECTED('Table'),'Table'[User]=MAX('Table'[User]) &&'Table'[status]="competent"))>=1,"competent",
"not yet competent")Measure 3 =
var _table=SUMMARIZE(ALL('Table'),[User],"sta",[Measure 2])
var _a=MAXX(FILTER(_table,[User] in VALUES('Table'[User])),[sta])
return
IF(MAX('Table 2'[status])="Status",_a,[Measure])
(3) Then the result is as follows.
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.