cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anileshknpowerb
Helper III
Helper III

Dynamically show the values based on the slicer selection

Hi Experts,

I have data in table as shown below :

 

ParentAccount SubAccount Amount
InInc                   InIncIn         1000
InInc                   InIncUK        2000
SamInc               SamIncIn      9000
SamInc               SamIncUS    8000
MicInc                MicIncIn       4000
MicInc                MicIncFR      3000

 

My requrement is, I have to create a slicer on ParentAccount. When I don't choose any ParentAccount, the horizontal bar chart should display at ParentAccount level. ie, the data should sum up at ParentAccount level. Below is the expected data shown in tabular format, I need the same in horizontal bar chart.

 

ParentAccount Slicer value : All
Account    Amount
InInc            3000
SamInc      17000
MicInc 7000

 

Now, if i choose any ParentAccount from the ParentAccount slicer, I should see data only for that account. Below example shows when I choose InInc

 

ParentAccount Slicer value : InInc
Account      Amount
InIncIn         1000
InIncUK        2000

 

Below example shows when I choose MicInc
ParentAccount Slicer value : MicInc
Account       Amount
MicIncIn         4000
MicIncFR        3000

 

Whats is working : When I choose any ParentAccount from the ParentAccount slicer, it shows expected data.

 

Whats not working : When I don't choose any ParentAccount(ie Choose All from slicer), its not showing up the proper data.

How to achieve this?

 

Note: ParentAccount and SubAccount are dynamic data and they are not static.

 

Thanks,

Anilesh

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @anileshknpowerb,

Did these suggestions help with your scenario? if that is the case, you can consider kudo or accept the most suitable one to help other users who faced a similar issue to find it more quickly.

If not, please share more detailed information to help us clarify and test to coding formula.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
v-shex-msft
Community Support
Community Support

HI @anileshknpowerb,

Maybe you can try to do parent-child hierarchy analysis on your table to expand them, then you can simply filter on the parent level to show all records with the same parent.

Parent-child hierarchies 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User IV
Super User IV

@anileshknpowerb , isfiltered can switch the calculation

refer this can help

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

 

But in case you want change the view/axis/row of data that would be difficult

for that you have use

Dynamically change chart axis in Power BI
https://www.youtube.com/watch?v=6jeSIRpjv0M
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/

 

or bookmarks https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors