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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

I need to create a slicer in AAS model

Hi,

Currently, 

I'm trying to create a slicer to filter depending on one or more conditions to get " active / inactive " 

suppose you have a product and it's on sale and it's sold = active / it's not on sale and it's not sold = inactive

I can create slicers in pbix file, but since I'm using visual studio (AAS model in there)
and I have datasets from ssms. I could create measures in visual studio, also in pbix.

Can I create a measure brings me that solution in only pbix ? 
Because I suppose I need a calculated column first to show to results in slicer to switch.
I can only write it down in SSMS, then I will have to deploy to AAS Model, so I can use it in pbix

Is there any other way? 

3 REPLIES 3
Anonymous
Not applicable

Hi, 

Thank you for respond.

Since, I'm using AAS model

I guess I will have to use adding a new column in SSMS and deploying to AAS model, finally I can use that calculated column in power bi to get the result in slicer.

 

So, this is close to your first solution (1.) right ?

Anonymous
Not applicable

HI @Anonymous,

In fact, calculated columns can't get the selection from filters, their results will be fixed and not respond with filters. So measure filter can be a choice for your scenario, you can add conditions in the measure expression and return flags, then use the flag to filter records.
Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @Anonymous,

Current power bi does not support creating a dynamic calculated column/table based on filter and slicer effect. (they are working on different levels, you cant use child level to affect its parent levels)
I'd like to suggest you create a measure instead then you can use it on the visual level filter to filter records.

Applying a measure filter in Power BI - SQLBI

Notice:

1. the data level of power bi.

Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)

2. Create calculated column on database side also not be a good choice, these columns only update when the data source updates.

Regards,

Xiaoxin Sheng

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.