Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi All,
I have been trying to put in the graph a constant line based on a calculated target. All works well but the problem is that the columns are based on markets and what I need is the total value.
So for example in the picture below:
The line is drawn around 0.85 when what I am trying to achieve is to drawn that line around 1.10 which is actually the sum of the two orange bars.
I looked around for such a thing I guess I need to aggregate this values into one otherwise it will get the highest.
Any ideas how I can achieve that?
Thank you
I can post a sample if needed.
Solved! Go to Solution.
Hello again,
I am just gonna put how I ended up using it:
# Requests Urgent Total = COUNTROWS(SUMMARIZE(FILTER(ALLSELECTED(SampleData),[# Requests Urgent]),SampleData[Id]))
# Requests Total = CALCULATE([# Requests],ALLSELECTED(SampleData))
KPI DoUR Total = CALCULATE([KPI DoUR Target],ALLSELECTED(SampleData))
With this for any Axis will always show the total not the individual aggregations, which was what I wanted also in the sample you can see that I can have the constant line as a measure as well in the Line and bar chart.
Here is the sample:
sample
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi All, used COUNTROWS(SUMMARIZE(SampleData,SampleData[Id])) and all seems to be correct.
Sorry if this looks simple, I have very little experience with PBI overall but improving.
Thanks all,
Hello again,
I am just gonna put how I ended up using it:
# Requests Urgent Total = COUNTROWS(SUMMARIZE(FILTER(ALLSELECTED(SampleData),[# Requests Urgent]),SampleData[Id]))
# Requests Total = CALCULATE([# Requests],ALLSELECTED(SampleData))
KPI DoUR Total = CALCULATE([KPI DoUR Target],ALLSELECTED(SampleData))
With this for any Axis will always show the total not the individual aggregations, which was what I wanted also in the sample you can see that I can have the constant line as a measure as well in the Line and bar chart.
Here is the sample:
sample
@rssilvaba , Try Clustered bar visual and have a line there. A measure like. Group is your legend column and Orange is your legend value
calculate([measure],filter(all(Table[Group]),Table[Group] ="Orange")
calculate([measure],filter((Table[Group]),Table[Group] ="Orange")
calculate([measure],filter(allselected(Table[Group]),Table[Group] ="Orange")
or check https://docs.microsoft.com/en-us/power-bi/desktop-analytics-pane