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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Show data when selected particular bar for a date

Hello All,

 

I have a report where I am showing dates and health in bar chart.

Now when I clicked on the perticular bar I need to show corresponding sales for that bar.

So I made interactions and working fine and to show nothing by default I am using below dax logic.

 

SalesLogic =
var _check = calculate(isfiltered('Global Stats'[TrendDate]), allselected())
return
if(_check, [Sales], blank())
 
 
Its working fine, Also I need to show profit also when I click on the bar for perticular date,
But its not showing profit if I use the same logic like below.
 
ProfitLogic =
var _check = calculate(isfiltered('Global Stats'[TrendDate]), allselected())
return
if(_check, [Profit], blank())
 
I am I missing something.
Could any one please help
1 ACCEPTED SOLUTION
PVO3
Impactful Individual
Impactful Individual

You are using a legend. If you remove the legend you can add this.

PVO3_0-1661153721904.png

 

 

 

View solution in original post

4 REPLIES 4
PVO3
Impactful Individual
Impactful Individual

IF(HASONEVALUE('Global Stats'[TrendDate]),[Profit])

 

If thats not working, maybe your [Profit] measure is using your [TrendDate] in some way or another.

Anonymous
Not applicable

Hi @PVO3 ,

 

Your solution is working fine, but I am not able to see the conditional formatting option to change my colors based on profit values.

 

Sathvik123_0-1661153097195.png

 

PVO3
Impactful Individual
Impactful Individual

You are using a legend. If you remove the legend you can add this.

PVO3_0-1661153721904.png

 

 

 

amitchandak
Super User
Super User

@Anonymous , Check for Hasonevalue too

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors