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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Bernstra
Frequent Visitor

Using a Measure to create a new column that can be used to filter

I am working with an Analysis Services dataset, and I do not have access to create a new column.  There is a column named "type" in the item table that we need to adjust, and then use to filter the data.  If I could create a column, then a couple IF statements and SWITCH work to do exactly what we need, but in this dataset that is not possible.  The data would be similar to the table below:

 

Item #GroupTypeNew Type
1AT1TA
2AT1TA
3BT2TB
4CT3TB

Where the New Type column is the column we would like to create:

Type T1 -> New Type TA

Type T2 -> New Type TB

Type T3 -> New Type TB

 

Is there a way to do this with a measure and be able to filter the table using the "new type"?

 

Thank you!

 

2 REPLIES 2
tackytechtom
Super User
Super User

Hi @Bernstra ,

 

How about this:

tomfox_0-1656020708729.png

 

TypeSwitchMeasure = 
SWITCH (
    TRUE(),
    MAX ( TableFilterExample[Type] ) = "T1", "TA",
    MAX ( TableFilterExample[Type] ) = "T2", "TB",
    MAX ( TableFilterExample[Type] ) = "T3", "TB",
    BLANK()
)

 

Note, measure cannot be used in slicers, so you need to use the fiilter pane to do filtering. Also, I highly recommend to ask your back end people to add the new types to the analysis services model. 

 

Hope it helps you anyway! 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Thank you @tackytechtom.  Unfortunately, I think getting the new types added to the model is probably the only way for this to work as we need.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.