[Mdx The Hierarchy Already Appears In The Axis1 Axis

0 views
Skip to first unread message

Jamar Lizarraga

unread,
Jun 13, 2024, 5:19:24 AM6/13/24
to wechandetac

I am trying to create an MDX sentence but I am getting this error: mdx hierarchy Article already appears in the axis0 axis. My question is... I get this error only when "Where" clause items are on columns or either in rows, how can I get a solution to this? Is there anyway to solve it without subselects?

One hierarchy can only appear in one axis (columns, rows, where) in MDX. Hence, when you want to restrict your selection, just do so directly on the columns axis and do not use the where clause at all:

mdx the hierarchy already appears in the axis1 axis


Download File --->>> https://t.co/ChfaoLciUQ



Problem is to identify a measure (no additional columns possible as I'm on a live connection) that would return the max value between target/revenue between all Years/Half Years/Quarters/Weeks to put in here:

Hi @aletib ,

See if this measure can get you pointed in the right direction. I created a sample data set and date table with the date hierarchy you described. This measure assumes the measures Orders and Target already exist.

First of all: thanks, Logic is nearly perfect! I am struggling at learning how to work with tables in DAX as I find it very difficult to debug/troubleshoot as there's no visibility of intermediate steps/output; if you have any suggestion on how to learn getting better, I'm in

The context of the measure takes into account the max "parent" (Half year in this example) value of 891.21M rather than only looking at the max child level (Quarter) of 676.48M. which is why the Y axis value is set to 891.21M


My assumption: MAXX(table, expression) searches for the highest value within the entire table which returns 891.21M while we want to look only at the deepest level of values (rows Q3 and Q4). Any clue?

I'll wait some days before flagging previous answer as a solution in case we reach an optimized version (and I'll then flag that one, if available, as solution)

Thank you so much again!
Ale

Trying to understand context in Power BI and how to anticipate what will be returned and why was difficult for me to grasp in the beginning. I believe it's one reason why many people get frustrated with Power BI. But once the we can understand how Power BI applies context to each DAX expression, Power BI can become much easier and very powerful.

In the measure, the logic checks if the bottom most level has one value. Then, checks the next level up until the default scenario is returned. I highlighted each condition to check to determine which grouping to return to find the MAX value of.

The first condition to check is if Quarter has one value. If true, that means the chart has been drilled down to the lowest level, so return a table with a group for the Week.

Next, to debug and troubleshoot, I will either create a visual with the columns used in an iteration function along with the measures added to the grouping, or I will use DAX Studio (DAX Studio DAX Studio) to run the DAX expressions to see what is returned.

Hi David, following up on this: is there anything more efficient we can use than hasonevalue?

Because when we drill down from year to half year (or HY to quarter), there's not a single value of year but multiple ones so the max is calculated on the year (1.069+455?1,525) and not on the half year 1.069):

so that should be something that if existed I'd call HasLeastValues
which brings us back to my initial approach: take the highest value of (all) Revenue and highest value of (all) forecast and pick that highest one.

your first solution was just perfect! I simply had messed up while testing and the HASONVALUE evaluations were being evaluated in the wrong order (starting by year and not quarter) thank you very much! First answer flagged as solution

A chart (or graph) lets you visualize data points along one or more axes. For example, use a chart to compare the sales amount with the sales target for each month, where these values are plotted against a vertical (Y) axis so that you can visually compare their quantities.

Many different types of charts are available to help you communicate your data effectively. This article explains how you can customize some of the key property settings that are common to multiple chart types.

TipAdd a legend separately when you want one in your chart like the example above. To add a chart title, go to Components in the toolbar of a dashboard or view, and add a Label.

Next, drag a measure and a hierarchy from a data connector or data cube in the Explore window onto the empty chart. You'll see the chart automatically reconfigured, for example a bar or line chart will have a left axis, bottom axis, major grid lines, and a series of data points.

To interact with the chart, switch to View mode. If a multi-level hierarchy such as Product was added, you can click on a triangle along the bottom axis to expand one of the hierarchy members (e.g., Bikes). Hover over one of the expanded bars to see a tooltip which shows the corresponding measure and hierarchy values.

Another way to display a chart is to re-visualize a different type of data visualization. For example, right-click (or long-tap) on a table visualization or select it and go to the toolbar, choose Re-Visualize, and then select the chart type you want. If you already have a chart, this menu will offer to change the chart type of your existing data point series to another type.

If you have multiple series of data points (e.g., for two measures), you can re-visualize each series independently. For example, right-click (or long-tap) on the second series, and you'll see a selection rectangle around the corresponding data points. Click Re-Visualize from the menu, and then select a different chart type such as Line.

Charts are usually configured with a left axis (or y-axis) and a bottom axis (or x-axis). From the Properties window for a chart, go to the Main tab to see the list of axes for the chart. You can also click on an axis directly in the chart itself to go to its properties.

You can also use the Quick Access Properties popup to change common settings such as colors and line widths. With Quick Access Properties already open after selecting the chart, click on a specific part of the axis such as a label or tick mark to update Quick Access Properties with settings for customizing that element.

Located in the overall chart properties (click the back button if you have the properties open for a specific axis), use the Horizontal Bars or Invert Axes property to switch the horizontal and vertical axes.

If the first or only hierarchy on the bottom (X) axis is date/time, then the chart will set the scale type to Date/Time automatically. If you want to use triangular expander buttons to easily expand and collapse hierarchy members, change the scale type to Category instead.

There's an easy way to switch the scale type between types when more than one is compatible with your data: right-click (or long-tap) on the chart, or find the option in the toolbar. It may be grouped under Chart Properties when multiple property shortcuts like these are available.

When using the same scale type on multiple axes (either in the same chart or in different charts), you can set the axes to have the same range. Select the option Share the scale with another chart or axis, and select the axis that should have the same range.

In version 23.3 and higher, you can incorporate placeholder keywords corresponding to filter values into the title, which can change according to interactions or filter changes. A popup will list any available keywords you can insert while you edit this setting (slicer filter values, slicer comparison filter values, or dynamic measure & hierarchy captions).

TipClick once on a chart when editing a dashboard to select it and see its properties in the Properties window, and a second time on a data point to select its series and properties. Or, right-click a series and choose Series Properties.

You can also use the Quick Access Properties popup to change common settings such as colors and borders. With Quick Access Properties already open after selecting the chart, click on a specific data point to update Quick Access Properties with settings for customizing that data point series.

You can have multiple series in a chart, each with a different chart type. Most can be combined together, but you can only combine the Pie chart type with other series set to the same type, and Radar chart types are only compatible with each other (e.g., you can combine Radar Line with Radar Point).

Any user viewing a chart with multiple series can also show or hide them using the context menu: right-click (or long-tap) the chart and select Show Series.... (Switch to view mode first if you are currently editing a dashboard or other view.)

Bar sizes, overlapping, and gaps can be set up in the Layout tab for bar charts. When using a Bubble chart type, you can change the size of the bubbles in the Layout tab.

Markers are symbols displayed at the location of the axis value over the data points of any chart type. They make locating this value easier on a chart, and are especially useful for line and area charts to pinpoint the data values along the line or area shape.

If your chart is not connected to a legend, you'll see a label on the chart identifying each series if you have more than one. This is called a series label, and this default behavior helps you to identify and distinguish between groups of data points.

Chart properties also allow you to further customize the text, or to set up multiple labels: for example, one label on top of each bar to display its value, and another inside each bar displaying its percentage from a formula.

795a8134c1
Reply all
Reply to author
Forward
0 new messages