When data is missing as shown below, a color legend for the missing data is displayed when a dual axis chart is created. How do we hide the empty measure item from the legend?
1. Add MONTH(Date) to Columns.
2. Add SUM(Sales) and SUM(Profit) to Rows.
3. Right-click SUM(Profit) in Rows shelf and select Dual Axis.
4. Open SUM(Sales) on the Marks card and change the mark type to Bar.
5. Create a calculated field and name it Color for Sales with the following formula:
IF NOT ISNULL([Sales]) THEN STR(YEAR([Date]))+" Sales" END6. Create a calculated field and name it Color for Profit with the following formula:
IF NOT ISNULL([Profit]) THEN STR(YEAR([Date]))+" Profit" END7. Open SUM(Sales) on the Marks card and add Color for Sales to Color.
001468220
126 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.