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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Line and clustered column chart shouldn't show line until something selected in a slicer

I have years and months in chiclet slicer and I have Line and clustered column chart that is showing water pumpage and temperature data. Please find the below screenshot for your reference.

 

chart.jpg

 

The default functionality for a slicer in Power BI seems to be that if nothing is selected in a slicer then summed values are showed as line in Line and clustered column chart. I don’t really need to see the temperature if there is more than one year picked. I don’t want to show the temperature (summed temperature which doesn’t really make much sense) when nothing or some years are selected.

What I would like to do is I wanted to show the temperature as a line only when one year is selected in the slicer. Is this possible?

1 ACCEPTED SOLUTION

Hi,

 

Please check this:

pbix 

Hope this helps.

 

Best Regards,

Giotto

View solution in original post

6 REPLIES 6
v-gizhi-msft
Community Support
Community Support

Hi,

 

According to your description, i create a sample to test:

10.PNG

Then try to create a seperate slicer table:

SlicerTable = DISTINCT(SELECTCOLUMNS('Table',"Year",'Table'[Year]))

Then try these two measures:

Sales Sum = IF(DISTINCTCOUNT(SlicerTable[Year])=1,0,CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Year] in FILTERS(SlicerTable[Year]))))

Sales Average = IF(DISTINCTCOUNT(SlicerTable[Year])=1,CALCULATE(AVERAGE('Table'[Sales]),FILTER('Table','Table'[Year]=SELECTEDVALUE(SlicerTable[Year]))),BLANK())

When you only select one value in slicer, the visual shows:

11.PNG

When you select more than one value or do not select any value in slicer, the visual shows:

12.PNG

13.PNG

Here is my test pbix file:

pbix 

Hope this helps.

 

Best Regards,

Giotto

 

 

Anonymous
Not applicable

Hi Giotto,

 

Thank you so much for your clear explaination!

 

I am sory for not explaining my problem clearly. 

Please find the below dataset

Dataset.jpg

What I am looking for is

 

When I select one value in slicer, I should see both columns and line in line and stacked column chart as shown in below screenshot

AFter selection.jpg

When I select more than one value or no selection I should see as below:

 

No selection or more than one selection.jpg

 

Please let me know if there is any way of doing this.

 

Thank you for your help!

 

Regards,

Aswini

Hi,

 

Please check this:

pbix 

Hope this helps.

 

Best Regards,

Giotto

amitchandak
Super User
Super User

@Anonymous 

This can give idea how many values are selected. You can change action or results

Measure = if(ISFILTERED('Date'[Year]),if(COUNTROWS(ALLSELECTED('Date'[Year]))>1,"Multiple","Sigle"),"No selection")

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

I created a measure as you suggested.. 

Measure = if(ISFILTERED('Pumpage'[Year]),if(COUNTROWS(ALLSELECTED('Pumpage'[Year]))>1,"Multiple","Single"),"No selection")
 
But how to link this with Chiclet slicer and line and clustered column chart? Please let me know if you have any idea.
Anonymous
Not applicable

Thank you for your time!

measure.jpg

 

I added measure to "filters on this visual" and selected Single. When I am selecting an year it is displaying "line and stacked column chart". Chart is empty when I make multiple year selection or when I don't make any selection.

 

What I want is when I select a single year it should display a line in "line and stacked column chart".  when I make multiple year selection or when I don't make any selection it should just display "stacked column chart" without line. Is there any way to do it?

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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 Solution Authors
Top Kudoed Authors