cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
andicornejo12
Frequent Visitor

How to Slice data that contains several entries from the slicer value

Hello,

 

I am stuck on how to solve this. Basically I have a dimensions table where I have a code and the description:

andicornejo12_0-1695400064344.png

On my fact table I have the records that can contain several codes from my dimensions table:

andicornejo12_1-1695400150993.png

How can I combine them or how can I use the Handling Code to slice the data in the fact table?

 

Hope I made my=self clear enough. Thanks for your help!

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @andicornejo12 ,

 

 

Here are the steps you can follow:

1. Create measure.

 

Flag =
var _select=SELECTEDVALUE('Table'[Hide Code])
return
IF(
CONTAINSSTRING(
    MAX('dimensions table'[Handling Code List]),_select)=TRUE(),1,0)

 

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1695720789967.png

3. Result:

vyangliumsft_2-1695720842189.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @andicornejo12 ,

 

 

Here are the steps you can follow:

1. Create measure.

 

Flag =
var _select=SELECTEDVALUE('Table'[Hide Code])
return
IF(
CONTAINSSTRING(
    MAX('dimensions table'[Handling Code List]),_select)=TRUE(),1,0)

 

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1695720789967.png

3. Result:

vyangliumsft_2-1695720842189.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Hi @v-yangliu-msft It doesnt work though if I pick more than one value in the slicer. Is it because of the format? would having spaces help? Thanks so much!!

Thanks a lot! works perfect 🙂

YukiK
Impactful Individual
Impactful Individual

You don't need to concatenate those values into a fact table. Just use the code column in a slicer visual, making sure there is a relationship between the dimension and fact table. That slicer visual would have the list of values you can slice and dice

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors