Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Last_Resort_22
New Member

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 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.

CategoryActivitiesCleanlinessCourtesyTotal Average
Property 14323.00
Property 34433.67
4 REPLIES 4
V-yubandi-msft
Community Support
Community Support

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

Jihwan_Kim
Super User
Super User

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.

 

Jihwan_Kim_1-1756181503247.png

 

 

Jihwan_Kim_0-1756181481782.png

 

 

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] ) )
        )
    )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
MarcoSparkBI
Frequent Visitor

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.

MarcoSparkBI_0-1756170968946.png

projection your category to have a seperate table. 

MarcoSparkBI_1-1756171012832.png

make this category an relationship one to many to survery table attibute.

MarcoSparkBI_2-1756171071316.png

create a measure call total average:

Total Average = AVERAGEX(Survey,Survey[Value]), put category table to a slicer. and you can slice what you want
MarcoSparkBI_3-1756171170526.png

above solution for your reference.

best regards.
marco

 

GeraldGEmerick
Resolver I
Resolver I

@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?

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.