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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Kev59
Helper I
Helper I

DAX - Dynamic field parameter according filters

Dear all

 

I'm using a field parameter in a segment to change the information shown in my graphs.

 

My field parameter looks like this:

 

 

_Dynamic Herarchy = {
    ("Market Segment", NAMEOF('CDD - Account Grouping'[Market Segment]),1),
    ("Customer Grouping", NAMEOF('CDD - Account Grouping'[CDD EU Customer Grouping]),2),
    ("Sold-To", NAMEOF('CDD - Account Grouping'[Sold To & Name]),3),
    ("Ship-To", NAMEOF('CDD - Invoiced Sales'[Ship To & Name]),4),
    ("BU",NAMEOF('Products'[BU]),5),
    ("Product Grouping",NAMEOF('Products'[Division Reporting Group Name]),6),
    ("Product",NAMEOF('Products'[Product]),7),
    ("Batch",NAMEOF('CDD - Invoiced Sales'[Batch]),8),
    ("Posting Date",NAMEOF('CDD - Invoiced Sales'[Posting Date]),9),
    ("Invoice Number", NAMEOF('CDD - Invoiced Sales'[Invoice Number]),10)
}

 

 

Is there a way to make it dynamic according the filters?

 

For example, if a filter is set on the "Market Segment", I would like to hide this option in the field parameter. And do the same for all parameters included in my field.

 

Is it possible to do someting like this?

 

Thanks in advance for your help

9 REPLIES 9
Kev59
Helper I
Helper I

Hi all

 

would something like this work?

 

_Dynamc Hierarchy = 
VAR _FilterMarket = IF(ISFILTERED ( 'CDD - Account Grouping'[Market Segment] ),- 1,1)
VAR _FilterGrouping = IF(ISFILTERED ( 'CDD - Account Grouping'[CDD EU Customer Grouping] ),- 1,1)
RETURN
{
    ("Market Segment", NAMEOF('CDD - Account Grouping'[Market Segment]),_FilterMarket),
    ("Customer Grouping", NAMEOF('CDD - Account Grouping'[CDD EU Customer Grouping]),_FilterGrouping),
    ("Sold-To", NAMEOF('CDD - Account Grouping'[Sold To & Name]),3),
    ("Ship-To", NAMEOF('CDD - Invoiced Sales'[Ship To & Name]),4),
    ("BU",NAMEOF('Products'[BU]),5),
    ("Product Grouping",NAMEOF('Products'[Division Reporting Group Name]),6),
    ("Product",NAMEOF('Products'[Product]),7),
    ("Batch",NAMEOF('CDD - Invoiced Sales'[Batch]),8),
    ("Posting Date",NAMEOF('CDD - Invoiced Sales'[Posting Date]),9),
    ("Invoice Number", NAMEOF('CDD - Invoiced Sales'[Invoice Number]),10)
}

And apply a filter on the segment?

 

Kev59
Helper I
Helper I

Hi @lbendlin 

 

I have some segments used as global page filters but I use field paramaters to adapt to data shown in a matrix for example.

 

And If I have set a global filter on a specific region or country for example, I don't need to have this option available in my field parameter...

 

That's why I would like to link both "filtering".

 

Feasible?

Is this something your users asked for?

Yes

 

For better clarity of the matrixes and to have field parameters with fewer options when global filters are used.

 

so, what I would do is feasible or not? Can I use IF function to create a modulable field parameters? Where can I find example?

 

Many thanks in advance for any help

 

ps: I know it's not a common request 😉

Enable "Personalize Visuals"  and teach your report users how to use that feature.

Sorry to say that but that doesn't answer my question: feasible or not.

 

And your solution is impossible in my case because the filters are inactivated on my report. Users use segments to filter my report pages (see below).

 

Kev59_0-1720451381018.png

 

 

 

 

I see.  I respectfully disagree with your design choices and will retire from this thread. I hope someone else can help you further.

no worry 😉

 

thanks

lbendlin
Super User
Super User

For example, if a filter is set on the "Market Segment", I would like to hide this option in the field parameter.

Why?  These concepts are independent of each other.  One is working on data level, the other on meta data level.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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