Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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 5
amitchandak
Super User
Super 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())))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not 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.

Anonymous
Not applicable

@amitchandak,

 

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]))

 

Mdm_4-1632215034204.png

 

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

 

Hi @Anonymous ,

 

Please try the following formula:

 

 

measure = 
IF ( 
    HASONEVALUE ( Table1[TIMEDATE] ),
    DISTINCTCOUNT ( Table1[Empnumber] ),
    CALCULATE (
        DISTINCTCOUNT ( Table1[Empnumber] ), 
        FILTER ( 
            Table1, 
            Date ( Year ( Table1[TIMEDATE] ), Month ( Table1[TIMEDATE] ), Day ( Table1[TIMEDATE] ) ) = Today () 
        )
    )
)

 

vkkfmsft_0-1632388888088.png

vkkfmsft_1-1632388928652.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Hi Winniz,

 

Thank you so much for taking time to respond my issue.

Due to deadlines, I was forced to apply a workaround with set of butttons (Today/Other days), bookmarks I was able to show the data correspondingly.

 

Anyway, I tried applying the formula you have provided,  bar chart at the right showed the current date value initially but it displayed nothing when any of the data point is selected in the line chart. Thanks Anyway. 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.