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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Daniff
Helper I
Helper I

best choice when buying

Good afternoon friends, I need your help here in a table relationship exercise.

 

In general, I need to select a seller and, according to what I bought, appear in the same table, all the options available in my warehouses within the group in which that same product is inserted.

 

Let's look at the case in the image.

 imagem_2023-02-06_101943320.png

 

 

 

Seller A,

 

I choose the month 2023-02-01 to see the sales of that seller in that month,

 

I select the type of products BB (this filter will filter the products that belong to this category that I sold and in the same table all the options must appear available for purchase at the warehouse for this seller A.

 

That is, for each sale, I want all the options available at the warehouses to appear for each product sold. Can you help me how to make this table? by dax please because by query as the sales database is big it is very slow! I enclose the power bi project.

 

Very grateful for your help!

 

project power bi - https://we.tl/t-BgF4uOElnU

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

Hi @Daniff,

It sounds like you want to achieve custom filter effect instead directly filter table records based on relationship.

For this scenario, I'd like to suggest you to use an unconnected table as source of slicer, then you can write measure formula to extract the current selection from filter and compare with table row context to return flag.

After these steps, you can use this formula on second table 'visual level filter' to filter and show the correspond records.

Display Flag =
VAR selection =
    VALUES ( NewTable[Seller] )
VAR currSeller =
    SELECTEDVALUE ( Table[Seller] )
RETURN
    IF ( currSeller IN selection, "Y", "N" )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Daniff,

It sounds like you want to achieve custom filter effect instead directly filter table records based on relationship.

For this scenario, I'd like to suggest you to use an unconnected table as source of slicer, then you can write measure formula to extract the current selection from filter and compare with table row context to return flag.

After these steps, you can use this formula on second table 'visual level filter' to filter and show the correspond records.

Display Flag =
VAR selection =
    VALUES ( NewTable[Seller] )
VAR currSeller =
    SELECTEDVALUE ( Table[Seller] )
RETURN
    IF ( currSeller IN selection, "Y", "N" )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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