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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I received a table from a customer.
I need to create a line chart in the report.
How to have a slicer with only Product A,B and C and when users didn't select any slicer, it shows the "All" product line chart?
| Product | Oct-19 | Nov-19 | Dec-19 | Jan-20 | Feb-20 | Mar-20 | Apr-20 | May-20 | Jun-20 | Jul-20 | Aug-20 | Sep-20 |
| All | 0.00% | 3.30% | 4.43% | 7.46% | 8.34% | 7.53% | 6.40% | 7.16% | 6.37% | 6.05% | 5.50% | 5.57% |
| Product A | 0.00% | 6.45% | 6.45% | 8.06% | 7.74% | 7.49% | 6.38% | 7.11% | 6.32% | 5.68% | 5.17% | 5.26% |
| Product B | 0.00% | 0.00% | 2.53% | 5.70% | 9.11% | 7.79% | 6.64% | 7.84% | 6.97% | 7.06% | 6.42% | 6.54% |
| Product C | 0.00% | 0.00% | 0.00% | 10.00% | 8.00% | 6.50% | 5.40% | 4.70% | 4.20% | 3.80% | 3.40% | 3.10% |
Solved! Go to Solution.
Hi, @PBI_newuser
According to your description, you can try my steps:
Measure =
IF(
ISFILTERED(Slicer[Name]),
SWITCH(
SELECTEDVALUE(Slicer[Name]),
"Product A",CALCULATE(MAX([Value]),FILTER('Table',[Product]="Product A")),
"Product B",CALCULATE(MAX([Value]),FILTER('Table',[Product]="Product B")),
"Product C",CALCULATE(MAX([Value]),FILTER('Table',[Product]="Product C"))),
CALCULATE(MAX([Value]),FILTER('Table',[Product]="All")))
And you can get what you want.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @PBI_newuser
According to your description, you can try my steps:
Measure =
IF(
ISFILTERED(Slicer[Name]),
SWITCH(
SELECTEDVALUE(Slicer[Name]),
"Product A",CALCULATE(MAX([Value]),FILTER('Table',[Product]="Product A")),
"Product B",CALCULATE(MAX([Value]),FILTER('Table',[Product]="Product B")),
"Product C",CALCULATE(MAX([Value]),FILTER('Table',[Product]="Product C"))),
CALCULATE(MAX([Value]),FILTER('Table',[Product]="All")))
And you can get what you want.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@PBI_newuser , I think for that you need to use buttons and bookmarks, Have a button to show all and other to select a product https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 126 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |