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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Syndicate_Admin
Administrator
Administrator

Display values that are not selected in the segmenter

Hello, good afternoon

I have a dashboard that shows information about restaurants and their products sold and a part of the report should show the restaurants that do not sell the selected product.

The model is like this

Yeztrom_0-1648241896435.png

There are two dimension tables, one for products and one for restaurants and there is a table of facts vw_product_prices in which the products sold are recorded day by day and it is specified in which restaurant it was sold.

At the beginning of the report there is a slicer with the list of products and the visual element that I want to create is a table that shows a list of the restaurants that did not sell the product selected in the slicer, I would like to know if there is a way to achieve this.

Best regards.

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

Hi @Syndicate_Admin ,

 

I have created a data sample:

Eyelyn9_0-1648610077983.png

 

You could create a flag measure:

Flag = 
var _t= ADDCOLUMNS(SELECTCOLUMNS('Product_Prices',"Rest_id",[master_restaurant_id],"Prod_id",[master_product_id]),"Prod_name",LOOKUPVALUE(Products[Product],Products[master_product_id],[Prod_id]  ))
var _allsold=CONCATENATEX(FILTER(_t,[Rest_id]=MAX('Restaurant'[master_restaurant_id])),[Prod_name],",")
var _allseleted= CONCATENATEX('Products',[Product],",")
return IF(CONTAINSSTRING(_allsold,_allseleted),1,0)

And apply it to filter pane, set as "is 0":

Eyelyn9_1-1648610175700.png

 

Best Regards,
Eyelyn Qin
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

2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

I have created a data sample:

Eyelyn9_0-1648610077983.png

 

You could create a flag measure:

Flag = 
var _t= ADDCOLUMNS(SELECTCOLUMNS('Product_Prices',"Rest_id",[master_restaurant_id],"Prod_id",[master_product_id]),"Prod_name",LOOKUPVALUE(Products[Product],Products[master_product_id],[Prod_id]  ))
var _allsold=CONCATENATEX(FILTER(_t,[Rest_id]=MAX('Restaurant'[master_restaurant_id])),[Prod_name],",")
var _allseleted= CONCATENATEX('Products',[Product],",")
return IF(CONTAINSSTRING(_allsold,_allseleted),1,0)

And apply it to filter pane, set as "is 0":

Eyelyn9_1-1648610175700.png

 

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

lbendlin
Super User
Super User

Use CROSSFILTER(,,none) in your measure to emulate a disconnected table.  Then you can show dimension values that do not have facts.   (for simple scenarios you can also use the "Show items with no data" flag.)

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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