Have a working pareto graph which shows sales as a bar and the cumulative % of sales as a line.
The following dax measures are used to create this information:
Sales and the product hierarchy key are in the same table.
Dax1:
CY Total Sales = sum(Sales[Invoiced Turnover])
Dax 2:
Pareto Demo PH3 =
VAR TotalRevenue = calculate(sum(Sales[invoiced turnover]),allselected(sales))
VAR CurrentRevenue = Sum(Sales[invoiced turnover])
VAR SummarizedTable =
Summarize(
Allselected(Sales[Product Hierarchy 3]),
Sales[Product Hierarchy 3],
“Revenue”,sum(Sales[invoiced turnover]))
VAR CumulativeSum =
sumx(Filter(SummarizedTable, [Revenue] >=CurrentRevenue),
[Revenue]
)
Return
CumulativeSum/TotalRevenue
When creating the visual, the x-axis is PH3, column y-axis is CY sales, and the line y-axis is Pareto Demo PH3. Everything works fine is as long as the PH key from the sales table is used for the x-axis.
But the PH is only a code and not useful for the visual. What is needed is to show the Key Name instead. The name, however, is referenced in another table (Key + Key Name).
In order for the pareto line to work, the two tables need to be joined to allow using the PH name and/or key. This is where I am stuck.