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
M4R10
Frequent Visitor

Same items sales

I am looking for a way to build a filter that allows me to consider the sales for the same list of items through selected stores.
This means, consider the list of products that have sales greater than zero in all selected stores.

 

For example:

STORE A has sales for the folloing list of items:

item 1

item 2

item 3

item 4

 

and STORE B has sales for the following list of items:

item 3

item 4

item 5

 

The result that I'm looking for is:

TOTAL SAME ITEMS SALES for STORE A + STORE B should only consider:

item 3

item 4

 

thanks in advance for any help

 

regards,

Mario

8 REPLIES 8
v-shex-msft
Community Support
Community Support

Hi @M4R10,

 

>>The result that I'm looking for is: TOTAL SAME ITEMS SALES for STORE A + STORE B should only consider:

Current power bi slicer/filter not support this feature.
In my opinion, I'd like to suggest you write a measure to check with variable table(create by INTERSECT function) and return the tag.

 

Tag = 
VAR current_T1 =
    LASTNONBLANK ( T1[Items], [Items] )
VAR current_T2 =
    LASTNONBLANK ( T2[Items], [Items] )
VAR Selected =
    INTERSECT ( ALLSELECTED ( T1[Items] ), ALLSELECTED ( T2[Items] ) )
RETURN
    IF ( current_T1 IN Selected || current_T2 IN Selected, "Y", "N" )

Then drag this measure to visual level filter, switch to 'is' mode and filter on tag 'Y'.

12.PNG

 

Regards,

Xiaoxin Sheng

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

thanks @v-shex-msft

 

I don't understand if your suggestion works for my model:

Captura.JPG

When you suggest to use two VARs related to T1[Items] and T2[Items], how should I take it considering I have only 1 items table?

 

What  Im trying to do is make a "live" inner join applied to items depending the store(s) selection

 

regards

Hi @M4R10,

 

Share the link from where i can download your file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur

 

I have uploaded the file to the following link:

https://we.tl/19AdsYIm1e

 

In this "Price" sampling I'm trying the apply the same rule regarding to identify "same items" across different days / stores.

thank you for any help.

Hi,

 

There is no file there.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur

 

The link expired after a month.

I have already uploaded again, follows the link:

https://we.tl/52vnSlrFHH

 

Hope you can advise to me.

 

regards

 

Hi,

 

I do not understand the relatioships you have built.  Why is there no relatioship from the Date column of the tbl_price table to the date column of the tbl_calendar table?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur

 

That is because the TBL_PRICES doesn't contain dates.

Dates are contained in the VISITS table, with a secondary PERIOD table to storage only the name of periods (PERIODS could be ommited anyway)

 

The model works as it is and all fields are connected through the current relationships.

 

Do you estimate the current structure and model could affect to reach a solution to the original question of the topic?

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.