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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
andicornejo12
Helper I
Helper I

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors