Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |