Forum Discussion
Bar graph issue
My matrix has net sales by top 10 customers. The graph shows values for all customers. I want the graph to show values as displayed in the matrix. Sample
Hi jwdal ,
Thank you for reaching out to the Microsoft Community Forum.
As you mentioned in your query, you want the graph to show values as displayed in the matrix.
Please refer below DAX measure.
Net Sales (Top10 Customers Selected) =VAR N = 10VAR ExcludeCustomer = "OXYCHEM"
VAR TopCustomersTable =TOPN(N,FILTER(SUMMARIZE(ALLSELECTED(AC_ALL),AC_ALL[Top10],"CustomerSales", [Net_Sales]),AC_ALL[Top10] <> ExcludeCustomer),[CustomerSales],DESC)
VAR TopCustomersSingleColumn =SELECTCOLUMNS(TopCustomersTable, "Cust", AC_ALL[Top10])
RETURNCALCULATE([Net_Sales],KEEPFILTERS(TREATAS(TopCustomersSingleColumn, AC_ALL[Top10])))Please refer below output snaps.For the year 2016 , the Matrix shows the value as "646" and the bar chart value as "646", both are same.For the year 2017 , the Matrix shows the value as "624" and the bar chart value as "624", both are same.
If you want , i will share .PBIX file.
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
9 Replies
- jwdalFrequent Visitor
No I want the graph to show business group but the total for all of the business group bars should be what's showing up in the matrix.
- jwdalFrequent Visitor
Close. The sum of the bar graph values should total 623.9874
- v-dineshyaCommunity Support
Hi jwdal ,
Thank you for reaching out to the Microsoft Community Forum.
As you mentioned in your query, you want the graph to show values as displayed in the matrix.
Please refer below DAX measure.
Net Sales (Top10 Customers Selected) =VAR N = 10VAR ExcludeCustomer = "OXYCHEM"
VAR TopCustomersTable =TOPN(N,FILTER(SUMMARIZE(ALLSELECTED(AC_ALL),AC_ALL[Top10],"CustomerSales", [Net_Sales]),AC_ALL[Top10] <> ExcludeCustomer),[CustomerSales],DESC)
VAR TopCustomersSingleColumn =SELECTCOLUMNS(TopCustomersTable, "Cust", AC_ALL[Top10])
RETURNCALCULATE([Net_Sales],KEEPFILTERS(TREATAS(TopCustomersSingleColumn, AC_ALL[Top10])))Please refer below output snaps.For the year 2016 , the Matrix shows the value as "646" and the bar chart value as "646", both are same.For the year 2017 , the Matrix shows the value as "624" and the bar chart value as "624", both are same.
If you want , i will share .PBIX file.
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
- v-dineshyaCommunity Support
Hi jwdal ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
- v-dineshyaCommunity Support
Hi @jwdal ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh