Forum Discussion
jschembre
4 years agoRegular Visitor
Predictive analysis using survey results
I am working with a survey in which each respondent answers multiple times on multiple days. I'm not sure if my problem would be better solved using a different data model or if it's measures. I...
- 4 years ago
Hi jschembre ,
Create two disconnected tables with the days and the colors then add the following measure:
Preidction = VAR selectedLines = FILTER ( GROUPBY ( ALLSELECTED ( 'Table' ), 'Table'[color], 'Table'[Name], 'Table'[day] ), 'Table'[day] = SELECTEDVALUE ( 'Weekday'[WeekDay] ) && 'Table'[color] = SELECTEDVALUE ( 'Color Slicer'[Color] ) ) VAR Selectpersons = SELECTCOLUMNS ( selectedLines, "Persons", 'Table'[Name] ) RETURN COUNTROWS ( FILTER ( 'Table', 'Table'[Name] IN Selectpersons ) )Result below and in attach PBIX file.
MFelix
4 years agoSuper User
Hi jschembre ,
Create two disconnected tables with the days and the colors then add the following measure:
Preidction =
VAR selectedLines =
FILTER (
GROUPBY ( ALLSELECTED ( 'Table' ), 'Table'[color], 'Table'[Name], 'Table'[day] ),
'Table'[day] = SELECTEDVALUE ( 'Weekday'[WeekDay] )
&& 'Table'[color] = SELECTEDVALUE ( 'Color Slicer'[Color] )
)
VAR Selectpersons =
SELECTCOLUMNS ( selectedLines, "Persons", 'Table'[Name] )
RETURN
COUNTROWS ( FILTER ( 'Table', 'Table'[Name] IN Selectpersons ) )
Result below and in attach PBIX file.
- jschembre3 years agoRegular Visitor
Thank you so much!