hymie_ho's avatar
hymie_ho
New Member
9 years ago
Status:
Needs Votes

Detect drilldown (drill-down) level to support changing measure / title

I have a bar chart with a custom hierarchy that drills through different groups of people (sales managers, territory managers, etc.). On the same report I have a measure that calculates AVERAGE (Sales). I want that measure to show the average sales for the current hierarchy (by Sales Managers or by Territory Managers). Here is some pseudo-code with a new DAX command YAXISVALUES that shows how I would use this: Average Display Value = VAR Total= SWITCH(YAXISVALUES () , "SM", SUM('Sales'[Sales ($)]) / DISTINCTCOUNT('Sales'[SM]), "TM", SUM('Sales'[Sales ($)]) / DISTINCTCOUNT('Sales'[TM]) ) RETURN IF(ISBLANK(Total),0,Total) See this topic for other use cases: https://community.powerbi.com/t5/Developer/Dyanmically-changing-the-title-based-on-the-drill-down/td-p/33411

8 Comments

Recent ideas