Forum Discussion
Matching Logic Report
- 1 year ago
Hi cingram11,
Yes, you can do this without creating a new table. You just need to add a calculated column in your existing table that checks if the item is bought by both Restaurant A and B.
Dax you can use :CommonItemFlag = VAR TargetBrands = {"Restaurant A", "Restaurant B"} VAR BrandCount = CALCULATE ( DISTINCTCOUNT(SalesData[Brand]), FILTER ( SalesData, SalesData[Item #] = EARLIER(SalesData[Item #]) && SalesData[Brand] IN TargetBrands ) ) RETURN IF(BrandCount = 2, 1, 0)This approach will return a value of 1 for items that are shared between the two restaurants. You can then filter this column in your report to display only these common items.
I hope this information is helpful.
If the answer is helpful, please click "Accept Answer" and feel free to give a Kudos, so others can benefit as well.
Best Regards,
Harshitha.
Hi cingram11,
Yes, you can do this without creating a new table. You just need to add a calculated column in your existing table that checks if the item is bought by both Restaurant A and B.
Dax you can use :
CommonItemFlag =
VAR TargetBrands = {"Restaurant A", "Restaurant B"}
VAR BrandCount =
CALCULATE (
DISTINCTCOUNT(SalesData[Brand]),
FILTER (
SalesData,
SalesData[Item #] = EARLIER(SalesData[Item #]) &&
SalesData[Brand] IN TargetBrands
)
)
RETURN
IF(BrandCount = 2, 1, 0)
This approach will return a value of 1 for items that are shared between the two restaurants. You can then filter this column in your report to display only these common items.
I hope this information is helpful.
If the answer is helpful, please click "Accept Answer" and feel free to give a Kudos, so others can benefit as well.
Best Regards,
Harshitha.
Hi cingram11,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Regards,
Harshitha.
- v-hjannapu1 year agoCommunity Support
Hi cingram11,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.
Thank you.- v-hjannapu1 year agoCommunity Support
Hi cingram11,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Regards,
Harshitha.