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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Last_Resort_22
Regular 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 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
8 REPLIES 8
V-yubandi-msft
Community Support
Community Support

Hi @Last_Resort_22 ,

Just following up has your issue been resolved, or are you still having any difficulties? If you need more information or help, please let us know. 

 

Thanks.

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.

V-yubandi-msft
Community Support
Community Support

Hi @Last_Resort_22 ,

I wanted to check in regarding your issue. Has it been resolved, or do you need any further information. Let me know if you’d like more details.

 

Thanks.

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.

Is it possible to create a measure with the functionality I mentioned when my model is basically a flat file? 

Last_Resort_22_0-1756849936831.png

Or do I have to create tables and connect them the way your example shows?

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 II
Resolver II

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