Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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 to select from a slicer which questions they care about and see the scores related to the questions they care about. But I have one issue.
Is it possible to create a measure that dynamically finds the total average of those selected values/questions they select from the slicer ? So if one user only cares about Activities and Cleanliness the Total Average measure would only look at those two measures and so on.
Category | Activities | Cleanliness | Courtesy | Total Average |
Property 1 | 4 | 3 | 2 | 3.00 |
Property 3 | 4 | 4 | 3 | 3.67 |
Hi @Last_Resort_22 ,
@MarcoSparkBI response meets your requirements and addresses the need. Please review it and let us know if any changes are needed.
Thank you for the clear explanation @MarcoSparkBI.
Regards,
Yugandhar
Hi,
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] ) )
)
)
hi, @Last_Resort_22 ,in your case, not necessary to use a parameter. i providing you one senario and hope this can be help:
load your data in power BI, select category and then unpivot other columns.
projection your category to have a seperate table.
make this category an relationship one to many to survery table attibute.
create a measure call total average:
above solution for your reference.
best regards.
marco
@Last_Resort_22 Yes, that is certainly possible to do. However, it is difficult to know the exact solution without additional information. If your slicer affects your matrix visual then this should happen automatically. Since that apparently is not occurring then something else must be going on. What is the formula for your Total Average measure?
User | Count |
---|---|
12 | |
11 | |
8 | |
7 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |