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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Super User

@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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.