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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.