The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
141 | |
109 | |
107 | |
76 | |
61 |
User | Count |
---|---|
276 | |
129 | |
124 | |
100 | |
89 |