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 August 31st. Request your voucher.

Reply
GTRC
Regular Visitor

VAR for column categorisation and later use in measures

Hi, 

 

I am trying to create 2 categories for multiple columns using VAR. In the image below OVERALL, QLTEACH, and STDSTRUC are one category '_question_4' (questions with 4 points answers) and the STDRELEV, TCHACTIVE are another _question_5' (questions with 5 points answers). 

 

I want later to be able to use SWITCH and AVERAGE based on the category they are in. This is a small sample of the dataset, so I need an efficient way to group the columns so I can later use the same measures based on criteria or names.

GTRC_0-1698640275308.png

 

First time on the forum, hope someone will be able to help me! 

 

Thank you

 

2 REPLIES 2
FreemanZ
Super User
Super User

hi @GTRC ,

 

not sure about your expectation. could you tell us more about it?

Hi @FreemanZ,

 

Those are survey answers and I am trying first to calculate valid answers. For example, out of 11 questions, it should be 8 questions answered correctly. Then, I need to change the scoring answers to another number to create a rate. For example, if the questions have 4-point answers, they should be 1=0, 2=33.33, etc. If the questions have 5-point answers, they should be 1=0, 2=25, etc. 

So, I thought if I categorised the question into a "group" then it would be easier to use it in measure. Thus my use of VAR.

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.