Forum Discussion
Last_Resort_22
1 year agoRegular Visitor
Dynamic Total Measure Dependent on Selected Parameters ?
So I have survey data and for each question/column I have created measure that finds the average. See below for example. My question is, I created a parameter that has each measure so a user is able ...
- 1 year ago
I have switched my method and am using an unpivoted table now. This method didn't work but granted I didn't provide a copy of the PBIX file so I undertstand I'm limiting the odds of an answer.
Jihwan_Kim
Super User
1 year agoHi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Average score: =
VAR _result =
AVERAGE ( survey[Value] )
VAR _slicerselect =
VALUES ( slicer_question[Question] )
RETURN
IF (
HASONEVALUE ( question[Question] ),
_result,
AVERAGEX (
FILTER ( VALUES ( question[Question] ), question[Question] IN _slicerselect ),
CALCULATE ( AVERAGE ( survey[Value] ) )
)
)
- Last_Resort_221 year agoRegular Visitor
Is it possible to create a measure with the functionality I mentioned when my model is basically a flat file?
Or do I have to create tables and connect them the way your example shows?