Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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?
Solved! Go to 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.
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.
Best Regards,
Angelia
Can you explain how your data is organized? Can you provide a sample of your data?
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/2016 | 1700 |
| 2/29/2016 | 1800 |
| 3/31/2016 | 1900 |
| 4/30/2016 | 2000 |
| 5/31/2016 | 2200 |
| 6/30/2016 | 2500 |
| 7/31/2016 | 2600 |
| 8/31/2016 | 2500 |
| 9/30/2016 | 2400 |
| 10/31/2016 | 2200 |
| 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/2016 | 2300 | yes |
| 6/30/2016 | 2500 | yes |
| 7/31/2016 | 2700 | yes |
| 8/31/2016 | 2600 | yes |
| 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.
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.
Best Regards,
Angelia
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.