Forum Discussion
Line value missing from combination chart
Here's my dataset, including a measure. The native dataset has numeric values by "statistic name". This is obviously ripe for a chart with "Statistic" as the column series.
I have a Total Employess Measure whose purpose is to always appear, regardless of what get's filtered on the Statistic field.
I want to see a combo chart with two of the statistics (New Starters, Attrition) as bars and one of them (Total Employees) as a line
I set it up like this. "Statistic" as the "Column Series", but then this is filtered by Attrition and New Starters (as a page filter) because those are the only one I want to see as bars
The Actual problem: even though my Total Employees measure appears in a filtered table, no line values appear on my chart.
How do I get the line values to appear on the chart? Perhaps there is a better way to model data for this purpose.
You have not selected total employee that is why it is filtered try with measure having all like
Total Employee new = calculate(Statistic[Total Employee],Filter(all(Statistic),[Statistic]="Employee")
or
Total Employee new = calculate(sum(Statistic[Value),Filter(all(Statistic),[Statistic]="Employee")
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
6 Replies
- amitchandakSuper User
You have not selected total employee that is why it is filtered try with measure having all like
Total Employee new = calculate(Statistic[Total Employee],Filter(all(Statistic),[Statistic]="Employee")
or
Total Employee new = calculate(sum(Statistic[Value),Filter(all(Statistic),[Statistic]="Employee")
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin- AnonymousNot applicable
Hi, I appreciate your response.
I'm not sure this is the issue, given that the measure appears OK on the table below the chart.
I believe the DAX in my first screenshot is functionally equivalent to your suggestions. I did change it to
Total Employees = CALCULATE(SUM(Statistics[Value]),ALL(Statistics),FILTER(ALL(Statistics),[Statistic]="Total Employees"))But got the same result
- v-lili6-msftCommunity Support
hi Anonymous
I have tested on my side, it works well.
From your screenshot, you measure is ok, and in the combination chart, I find that the Y-axis column is start from 0 and end to 1.
So the problem must be that you have set the fixed value for Y-Axis of this combination chart
Regards,
Lin
- AnonymousNot applicable
Thanks very much for taking the trouble to reproduce the issue - I do appreciate it. You have confirmed for me that this actually works. (and I actually have a different tab where this works).
The Y axis is set to 0 to Auto. I tried hard coding to 100 it changed the X-Axis! (but no measure appeared)
-If I move the measure to tooltips, the value appears correctly in the tooltip
-If I change the visualisation to table, the measure is shown
-If I click the measure and change "Show Values As" from "No calculation" to "Percent of Grand Total", the measure is shown (obviously not showing the value that I want)
Maybe it has something to do with DAX + filtering the value but as that appears to be the main difference in all of this.
My DAX is currently:
Total Employees = CALCULATE(SUM(Statistics[Value]),FILTER(ALL(Statistics[Statistic]),[Statistic]="Total Employees"))- v-lili6-msftCommunity Support
hi Anonymous
If possible, could you please share your sample pbix file for us have a test, there should be something wrong in other.
You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.
Regards,
Lin