The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I couldn't find a similar situation through searching, so I apologize if this has been answered before, and I missed it:
I'm trying to plot a line chart that allows a user to toggle on/off the following lines:
1) the product prices on the y-axis (multiple parameters in $ per unit), and
2) the product volume sold on the secondary y-axis (single parameter in units; used as a graphical overlay).
Example linked here, I hope: Seconday_Y-Axis_Issue_Demo.pbix
I'm aware that a field parameter with just one parameter won't allow the user to toggle on/off the line, but the client data is such that I only have a single variable for volume, and the price/volume variables are in different units and at different scales.
I've tried a few workarounds (ex. "IF(ISBLANK(SELECTEDVALUE...", or creating an "On/Off" set in the field parameter and concealing the always-selected "Off" parameter with a filled rectangle shape, etc.), but no matter what I do, I see little errors appear, particularly in the line chart's legend.
In short: is there a way to design a line chart visualiztion that allows a user to toggle on/off a single variable (e.g., volumes sold) on the secondary y-Axis just as easily as a user currently can with the multiple variables (e.g., produce prices) on the y-axis?
(In other words, for the example file linked above, I would like the user to be able to toggle the "Avg Weekly Volume Sold" series on/off as easily as they could toggle the Avocado, Banana, and/or Cherry price series without any issues appearing on the chart's legend. I suspect I may be looking at bookmarks, but I wanted to ask the experts before going that route.)
Thank you all so much in advance!
-Mike
Solved! Go to Solution.
If you want to allow the "Avg Weekly Volume Sold" series to be toggled on/off, you can add an "empty" option to the field parameter table as follows (the 4th column is renamed to "Volume Toggle" in this example):
Volumes Sold =
{
( "Avg Weekly Volume Sold", NAMEOF ( [Avg_Vol] ), 0, "Show Volume" ),
( "BLANK", "BLANK", 1, "Hide Volume" )
}
Then place the "Volume Toggle" column on the 2nd slicer and make it single-select (but leave chart as-is):
Is this the sort of thing you were looking for?
(PBIX attached)
Hi @CO_D8a_Wrangler ,
Thank you for reaching out to the Microsoft Community Forum.
Hi @OwenAuger , Thank you for your prompt responses.
Hi @CO_D8a_Wrangler ,
Could you please try the proposed solution shared by @OwenAuger . Please do let us know if you have any further queries.
Regards,
Dinesh
Thank you for the gentle reminder; I was out of the office and just getting back in.
If you want to allow the "Avg Weekly Volume Sold" series to be toggled on/off, you can add an "empty" option to the field parameter table as follows (the 4th column is renamed to "Volume Toggle" in this example):
Volumes Sold =
{
( "Avg Weekly Volume Sold", NAMEOF ( [Avg_Vol] ), 0, "Show Volume" ),
( "BLANK", "BLANK", 1, "Hide Volume" )
}
Then place the "Volume Toggle" column on the 2nd slicer and make it single-select (but leave chart as-is):
Is this the sort of thing you were looking for?
(PBIX attached)
THANK YOU, @OwenAuger, for your solution and for your patience while I was out of the office. This approach is perfect! I didn't think to try to use an empty "BLANK" in the field parameter--now I know that's a possibility! I really appreciate your time and effort!!
Indebted,
-Mike