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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
abinashkhamari
New Member

Not able to create a slicer

Hi Team,

 

I am facing an issue in creating a slicer. I have two tables. 

Site table

CountrySiteIDSite NameSite Status
France1SN1Open
France2SN2Closed
France3SN3Closed
France4SN4Open
France5SN5Open
France6SN6Closed
France7SN7Open
France8SN8Open

 

Fact table and they are joined using siteID

 

MonthSiteIDKPI NameKPI Value
Jan-211kpi_cost20
Jan-211kpi_vol99
Feb-211kpi_cost40
Feb-215kpi_cost43
Feb-215kpi_vol67

 

I have two calculated measures 

Volume = CALCULATE(SUM('Fact table'[KPI Value]),'Fact table'[KPI Name]="kpi_vol")
Cost = CALCULATE(SUM('Fact table'[KPI Value]),'Fact table'[KPI Name]="kpi_cost")
 
My requirement is to create a table as shown below but with two slicers
a) Site Status (which i am able to do) 
b) Volume slicer which will have two values 
    1. Volume Is Blank 
    2. Volume Is not Blank 
I am not able to create this slicer. Please help.
abinashkhamari_0-1653041815148.png

 

1 ACCEPTED SOLUTION
sanalytics
Super User
Super User

@abinashkhamari 

 

Easiest way to achieve this by Buttons and selection instead of having slicer.

 

If you badly need a slicer then  can we have flexilibity to show 0 instead of Blank?

 

if yes, then below are steps

 

1) Crate New Volume Measure = 

IF( ISBLANK( [Volume] ),0,[Volume])
2) Create another measure which will show the Facttable SiteID
FactSiteID = 
IF(
MAX ( DimSite[SiteID] ) IN ALLSELECTED( FactTable[SiteID]),1,0)
3) Create a Disconnected table with Volume is 0 and Volume is not 0 and dragged it into a slicer
4) Create below set of measures

Volume is 0 =
VAR _Summarize =
SUMMARIZE( DimSite ,DimSite[Country],DimSite[SiteID],DimSite[Site Name],DimSite[Site Status],"Volume",[New Volume],"Filter",[FactSiteID] )
VAR _3 =
FILTER(
_Summarize,[Filter] = 0
)
VAR _result=
SUMX(
_3,[Volume] )
RETURN
_result
 
Volume is not 0 =
VAR _Summarize =
SUMMARIZE( DimSite ,DimSite[Country],DimSite[SiteID],DimSite[Site Name],DimSite[Site Status],"Volume",[New Volume],"Filter",[FactSiteID] )
VAR _3 =
FILTER(
_Summarize,[Filter] = 1
)
VAR _result =
SUMX(
_3,[Volume] )
RETURN
_result
 
5) Finally, create a consolidated measure
volume selection = 
IF(
SELECTEDVALUE('Volume Slicer'[Column1]) =1 ,
[Volume is 0],[Volume is not 0 ] )
 
Please have a look on below screenshot
 
sanalytics_0-1653051265745.pngsanalytics_1-1653051279516.png

 

 
 

Hope it will help you

Regards

sanalytics

 

If it is your solution then please like and accept it as solution

 

View solution in original post

1 REPLY 1
sanalytics
Super User
Super User

@abinashkhamari 

 

Easiest way to achieve this by Buttons and selection instead of having slicer.

 

If you badly need a slicer then  can we have flexilibity to show 0 instead of Blank?

 

if yes, then below are steps

 

1) Crate New Volume Measure = 

IF( ISBLANK( [Volume] ),0,[Volume])
2) Create another measure which will show the Facttable SiteID
FactSiteID = 
IF(
MAX ( DimSite[SiteID] ) IN ALLSELECTED( FactTable[SiteID]),1,0)
3) Create a Disconnected table with Volume is 0 and Volume is not 0 and dragged it into a slicer
4) Create below set of measures

Volume is 0 =
VAR _Summarize =
SUMMARIZE( DimSite ,DimSite[Country],DimSite[SiteID],DimSite[Site Name],DimSite[Site Status],"Volume",[New Volume],"Filter",[FactSiteID] )
VAR _3 =
FILTER(
_Summarize,[Filter] = 0
)
VAR _result=
SUMX(
_3,[Volume] )
RETURN
_result
 
Volume is not 0 =
VAR _Summarize =
SUMMARIZE( DimSite ,DimSite[Country],DimSite[SiteID],DimSite[Site Name],DimSite[Site Status],"Volume",[New Volume],"Filter",[FactSiteID] )
VAR _3 =
FILTER(
_Summarize,[Filter] = 1
)
VAR _result =
SUMX(
_3,[Volume] )
RETURN
_result
 
5) Finally, create a consolidated measure
volume selection = 
IF(
SELECTEDVALUE('Volume Slicer'[Column1]) =1 ,
[Volume is 0],[Volume is not 0 ] )
 
Please have a look on below screenshot
 
sanalytics_0-1653051265745.pngsanalytics_1-1653051279516.png

 

 
 

Hope it will help you

Regards

sanalytics

 

If it is your solution then please like and accept it as solution

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors