Forum Discussion
bleaf
8 years agoRegular Visitor
Dynamic change in X Axis
Hi I have a bar chart including each company sales (Table1) and benchmark sales (Table2). The benchmark calculation is a measure of average sales based on the selection of Category of companies. Fo...
bleaf
8 years agoRegular Visitor
Thank you for inputs. It's same result after I added ALLSELECTED the measure:
SalesBenchmark =
VAR AverageSalesPerCategory = IF(HASONEVALUE(Sales[Category]),CALCULATE(AVERAGE(SalesBenchmark[Sales]),FILTER(ALLSELECTED(SalesBenchmark),SalesBenchmark[Category]=[CategorySlicer])))
VAR AverageSalesCrossAllCategory = CALCULATE(DIVIDE(SUM(SalesBenchmark[Sales]),DISTINCTCOUNT(SalesBenchmark[Company])))
RETURN
IF(HASONEVALUE(Sales[Category]),AverageSalesPerCategory,AverageSalesCrossAllCategory)
v-chuncz-msft
8 years agoCommunity Support
- bleaf8 years agoRegular Visitor
Still same after I changded the second calculate in variable. I guess I have to recreate data model to make it works. Thank you.
- Ashish_Mathur8 years agoSuper User
- bleaf8 years agoRegular Visitor
Hi Ashish,
Thank you very much. I am going to try different approach to solve this issue. Thanks.