Forum Discussion
Chart Titles that adjust to the drill down layer
- Anonymous9 years ago
Hi Anonymous,
The blog which BhaveshPatel provided is use card visual and slicer to achieve the dynamic title.
Hide the default title, and get the select value from slicer, then deal with these data and convert them to specify format.
For example.
Measure:
SelectValue = var selected= ALLSELECTED(Cycle[DayOfWeek]) var leftPart=CONCATENATEX(TOPN(COUNTROWS(selected)-1,selected),[DayOfWeek]&",")//use topn and countrow to remove last record var rightPart=EXCEPT(selected,TOPN(COUNTROWS(selected)-1,selected))//use except function to get the last record var resultString= LEFT(leftPart,LEN(leftPart)-1)&" And "&rightPart//merge left part and right part Return "Dynamic title by "&if( COUNTROWS(selected)=1,ALLSELECTED(Cycle[DayOfWeek]),resultString)//check select records' count, if selected records' count greater or equal than 2, use merged result string
Create a card visual and drag this measure to it, then turn off the category label.
Create a slicer to choose the display value.
Drag the card visual ot left top corner of the chart.
Click on slicer to change the result string.
Reference of Dax function:
Regards,
Xiaoxin Sheng
Hi Bhavesh,
Thanks for the link.
Do drill downs behave as 'filters' this way?
I had stumbled by this blog before and had not managed to get it working as the example seems to be referencing slicer data.
Not being too familiar with DAX, if i make a simple formula:
selectedMonths = COUNTROWS(VALUES (Invoicing_ALL[Month] ))
At the upper level, I get a value of 5 (5 rows - July through November), when I drill down clicking on say July, that number is still 5.
There must be a way I am able to identify the context of what I have selected to drill into... Might even be missine something very simple.
Thanks.
Hi Anonymous,
The blog which BhaveshPatel provided is use card visual and slicer to achieve the dynamic title.
Hide the default title, and get the select value from slicer, then deal with these data and convert them to specify format.
For example.
Measure:
SelectValue = var selected= ALLSELECTED(Cycle[DayOfWeek]) var leftPart=CONCATENATEX(TOPN(COUNTROWS(selected)-1,selected),[DayOfWeek]&",")//use topn and countrow to remove last record var rightPart=EXCEPT(selected,TOPN(COUNTROWS(selected)-1,selected))//use except function to get the last record var resultString= LEFT(leftPart,LEN(leftPart)-1)&" And "&rightPart//merge left part and right part Return "Dynamic title by "&if( COUNTROWS(selected)=1,ALLSELECTED(Cycle[DayOfWeek]),resultString)//check select records' count, if selected records' count greater or equal than 2, use merged result string
Create a card visual and drag this measure to it, then turn off the category label.
Create a slicer to choose the display value.
Drag the card visual ot left top corner of the chart.
Click on slicer to change the result string.
Reference of Dax function:
Regards,
Xiaoxin Sheng
- kenthub9 years ago
Helper I
This is an excellent tutorial but I have an extended question!
I have the Card working to show the selected category when chosen without drill down turned on. However when drill down is ENABLED, and I click on a category it just keeps the default text.
Is there a way for this to carry over with the drill down turned on or is the slicer the only option?