Forum Discussion
Controlling Visual's default Content
HI Experts,
I have a scenario in which there is a page with 1 line chart with slicer fitlered for last 3 weeks and two bar chart visuals.
When the report is opening for first time except the line chart (which shows last 3 weeks data) all other bar chart visuals should show only current days's data. But on further interactions from line chart the bar chart should correpondingly show the data for the dates filtered from line chart.
I tried this with a hidden slicer only linked to bar charts with today's date. but on further interactions from line chart, bar charts dont respond, even though the line chart is set to cross filter/highlight bar charts.
Please advise the appropriate setup. Thanks.
Regards
Learner
5 Replies
- amitchandakSuper User
Anonymous , Assume you are using Measure in Bar. In place of that use the below measure
if(isfiltered('Date'[Date]), [Measure], calculate([Measure], filter('Date', 'Date'[Date] =Today())))
- AnonymousNot applicable
Thanks for the instant update amit,
I am using T-SQL query in my model. Bar chart didnt use any measure and uses the field direclty.
Line chart uses count of employees (value) by date (year-> quarter- > month -Day) (Axis)
Bar chart uses count of employees (value) by location (Axis)
Please advise. Thanks.
- AnonymousNot applicable
Based on your suggestion, I tried replacing the measure field by a calculation but it is not fully responding as expected. when it shows todays count (emp attendance) by default, it doesnt show the count passed by filtering from line chart per day. Please refer below the measure calculation and the report visuals and advise further.
EmpCnt = if( isfiltered(Table1[TIMEDATE]),
calculate(DISTINCTCOUNT(Table1[Empnumber]), filter(Table1, Date(Year(Table1[TIMEDATE]),Month(Table1[TIMEDATE]),Day (Table1[TIMEDATE])) =Today()))
,DISTINCTCOUNT(Table1[Empnumber]))In the above image, bar chart at the right, shows today's emp attendance count, with the above measure calculaton. But when clicked anywhere in the line chart, the corresponding values are not shown/filtered in the bar chart. Thus the bar chart value remains with today's value ever.
Please note that all the 3 visuals are set to filter/highlight interactions between each other and suggest if the anything is missing in this approach.
Thanks