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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
lramalingam
Frequent Visitor

Visual in Power BI

Hello,

 

I am new to Power BI and I need some help with my visual in Power BI.  I have a slicer listing all segments.  I have a line and stacked chart that shows different measures.  When I select individual segments the chart shows correctly.  But my requirement is that if even one of the segments selected in a slicer does not have values for a specific measure then that whole measure should be hidden. Only display measures that contains values for all the segments selected.  I have created a calculated measure that can show or hide but it does not work the way I need it.

Above Pipeline Quarterly =
VAR Selection = SELECTEDVALUE('RPT_Load '[Product_Segment],"Multiple Selections")
RETURN Selection
SWITCH(TRUE(),
Selection IN {"AS","PS"} , BLANK(),
Selection = "All" , BLANK(),
SUM('RPT_Load '[Above_Pipeline_Quarterly_Total]
))

 

Greatly appreciate any help.

 

 

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@lramalingam 

try a measure

Above Pipeline Quarterly = 
SWITCH(TRUE(),
COUNTROWS(FILTER(SELECTCOLUMNS(RPT_Load,"ProductSegment",'RPT_Load'[Product_Segment]), [ProductSegment] IN {"AS","PS"})) > 0, BLANK(),
SUM(RPT_Load[Above_Pipeline_Quarterly_Total])
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

5 REPLIES 5
az38
Community Champion
Community Champion

@lramalingam 

try a measure

Above Pipeline Quarterly = 
SWITCH(TRUE(),
COUNTROWS(FILTER(SELECTCOLUMNS(RPT_Load,"ProductSegment",'RPT_Load'[Product_Segment]), [ProductSegment] IN {"AS","PS"})) > 0, BLANK(),
SUM(RPT_Load[Above_Pipeline_Quarterly_Total])
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hello,

 

The solution provided worked very well.  But there has been a change to the request.  I now need to check the quarter and also check if there is data for all segments.  If there is no data for any one of the segments for that quarter then I need to suppress the measure from the visual.  Also is it possible to do this without hard coding any segment and make it dynamic?  

 

Greatly appreciate any help.

Thank you so much!!!

az38
Community Champion
Community Champion

@lramalingam 

what part of statement doent work as desired?

dont you try CALCULATE() over sum()? like CALCULATE(SUM('RPT_Load '[Above_Pipeline_Quarterly_Total])


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Thank you for your response.  I tried Calculate too.  The code does not work when I multi select any other products that is not AS or PS.  When the selection does not contain AS or PS the pipeline should display.  If AS or PS are part of the selection then Pipeline data should be hidden.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors