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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
flexfleet
Frequent Visitor

Slicer or Filter to hide forecast but but underlying values

I have a need to be able to show a dataset and be able to turn on and off a forecast as part of that data. I've tried doing this multiple ways, in a separate table, in the same table. I can't quite fiture this out. 

 

Basically I need to be able to click a slicer or filter else and hide the black line without hiding the other data as well. Just hide the black line. 

 

Currently if I click the slicer it makes all that data disappear. How can I make the black line disappear without affecting the blue line?

 

 

 

BI1.jpgBI2.jpg

1 ACCEPTED SOLUTION

Hi @flexfleet,

Could you please share the solution used to create the line chart for further analysis. I cann't find why is the data disappear, and I don't reproduce it.

I try to create the same chart and get expected result, please review it.

Based on your description, it will show dynamic columns on a chart using the slicer option. LASTNONBLANK function can be used to point at one column.

First, I create a another table which includes a column.

 
1.png

Then I create a measure using the following formula.


May Forecast = IF(LASTNONBLANK(AAA[Tag],1)="Yes",LASTNONBLANK(Table1[Product],1)&&LASTNONBLANK(Table1[May Forcast],2),LASTNONBLANK(Table1[May Forcast],2))



Finally, I create a line chart, select the DateProduct as Axis, Product column, May Forecast as Values. Create a slicer including the new column. And connect it with the line chart. From the following screenshot, it will display two lines when select “No”, otherwise, it will hide the black line.

 

2.png  3.png
Best Regards,
Angelia

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

Can you explain how your data is organized? Can you provide a sample of your data?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I've tried to figure out how to upload my data file but it seems I can only upload photos, and link to videos....

 

I've tried it all in 1 table and tried it in 2 separate tables. Both doing the same thing. Essentially my data looks like this:

 

The goal is to be able to tun on and off a column of data without hiding the other columns. 

 

DateProduct

1/31/20161700
2/29/20161800
3/31/20161900
4/30/20162000
5/31/20162200
6/30/20162500
7/31/20162600
8/31/20162500
9/30/20162400
10/31/20162200
11/30/2016 
12/31/2016 
1/31/2017 
2/28/2017 
3/31/2017 

 

DateMay ForecastFilter

1/31/2016  
2/29/2016  
3/31/2016  
4/30/2016  
5/31/20162300yes
6/30/20162500yes
7/31/20162700yes
8/31/20162600yes
9/30/2016  
10/31/2016  
11/30/2016  
12/31/2016  
1/31/2017  
2/28/2017  
3/31/2017  

 

Hi @flexfleet,

Could you please share the solution used to create the line chart for further analysis. I cann't find why is the data disappear, and I don't reproduce it.

I try to create the same chart and get expected result, please review it.

Based on your description, it will show dynamic columns on a chart using the slicer option. LASTNONBLANK function can be used to point at one column.

First, I create a another table which includes a column.

 
1.png

Then I create a measure using the following formula.


May Forecast = IF(LASTNONBLANK(AAA[Tag],1)="Yes",LASTNONBLANK(Table1[Product],1)&&LASTNONBLANK(Table1[May Forcast],2),LASTNONBLANK(Table1[May Forcast],2))



Finally, I create a line chart, select the DateProduct as Axis, Product column, May Forecast as Values. Create a slicer including the new column. And connect it with the line chart. From the following screenshot, it will display two lines when select “No”, otherwise, it will hide the black line.

 

2.png  3.png
Best Regards,
Angelia

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors