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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
cplesner
Helper III
Helper III

Using parameters to construct calculation filters

Hi

 

I'm trying to construct a Measure Calculation that is based on Parameters - if possible...

 

I have a standard model with Product, Customer and Date. And for comparrison purposes i also have a range of baseline dimensions that are related to the same column in the fact table.

Baseline Product

Baseline Date

Baseline Customer

 

baseline.PNG

All three tables for baseline have relationships to the fact table, but are set as inactive (while Product, Date and Customer tables are active)

 

Now, if the user is using one or more of the baseline table to filter ex. the "Baseline Sale" they should overrule the active counterpart, but if they are not filtered, the already active relationship should be used.

 

As there are currently 3 "baseline tables" there are 9 different combinations that I could do IF statements to handle although it's not going to be pretty, so i was wondering if Parameters could be used to "construct" the calculation - something like:

 

Baseline Sale =
VAR Parameter1 =
    IF (
        ISCROSSFILTERED ( 'Baseline Customer' ),
        "USERELATIONSHIP('Baseline Customer'[Customer Code],Sales[Customer Code]),ALL(Customer)",
        ""
    )
VAR Parameter2 =
    IF (
        ISCROSSFILTERED ( 'Baseline Date' ),
        "USERELATIONSHIP('Baseline Date'[Date],Sales[Date]),ALL(Date)",
        ""
    )
VAR Parameter3 =
    IF (
        ISCROSSFILTERED ( 'Baseline Products' ),
        "USERELATIONSHIP('Baseline Products'[Product Code],Sales[Product Code]),ALL(Products)",
        ""
    )
RETURN
    CALCULATE ( SUM ( Sales[Sales] ), Parameter1, Parameter2, Parameter3 )

 

So if ex. Baseline Customer is crossfiltered, use Baseline Customer relationship instead otherwise do nothing etc. That way the final calculation might end up just using baseline relationship for ex. just Date and Product

 

Any ideas are welcome 🙂

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@cplesner,

 

As far as I know, this is not supported. You may submit an idea via https://ideas.powerbi.com/forums/265200-power-bi.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.