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
MichaelHalling
Frequent Visitor

Using Slicer as input for a DAX measure ignoring some visual filters

Hi

I am trying to replicate with DAX what I can do in Excel. Basically, I need a measure that can lookup some values from a Table based on the hard coded value "Xccy" in the Base Column and a dynamic value provided by a Slicer (retrieved in DAX by 

SELECTEDVALUE(Selector[CCY])). I want the visual filter for the column "Period" to still be active but ignoring columns "CCY" and "Base" in the Visual. I.e. depending what I choose from the slicer the measure returns differtent values in real time and changes as presented in the tables below. Possible? Help much appreciated.  

 

 Capture.PNG

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

Certainly! It seems like you want to create a DAX measure that looks up values from a table based on a hardcoded value "Xccy" in the Base Column and a dynamic value from a slicer for the CCY column, while still considering the visual filter on the Period column.

Assuming you have a table named "YourTable" and the columns are "Base," "CCY," and "Period," and you want to create a measure that looks up values based on "Xccy" in the Base column and the dynamic CCY from the slicer, you can use the following DAX formula:

 

YourMeasure =
CALCULATE (
SUM ( YourTable[YourValueColumn] ),
YourTable[Base] = "Xccy",
YourTable[CCY] = SELECTEDVALUE ( Selector[CCY] )
)

 

Replace "YourValueColumn" with the actual column that you want to aggregate or perform calculations on.

This DAX measure uses the CALCULATE function to modify the filter context. It filters the table to include only rows where the Base column is "Xccy" and the CCY column matches the selected value from the slicer. The visual filter on the Period column is still considered.

Make sure to adjust the column names and table names according to your actual data model.

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

View solution in original post

1 REPLY 1
123abc
Community Champion
Community Champion

Certainly! It seems like you want to create a DAX measure that looks up values from a table based on a hardcoded value "Xccy" in the Base Column and a dynamic value from a slicer for the CCY column, while still considering the visual filter on the Period column.

Assuming you have a table named "YourTable" and the columns are "Base," "CCY," and "Period," and you want to create a measure that looks up values based on "Xccy" in the Base column and the dynamic CCY from the slicer, you can use the following DAX formula:

 

YourMeasure =
CALCULATE (
SUM ( YourTable[YourValueColumn] ),
YourTable[Base] = "Xccy",
YourTable[CCY] = SELECTEDVALUE ( Selector[CCY] )
)

 

Replace "YourValueColumn" with the actual column that you want to aggregate or perform calculations on.

This DAX measure uses the CALCULATE function to modify the filter context. It filters the table to include only rows where the Base column is "Xccy" and the CCY column matches the selected value from the slicer. The visual filter on the Period column is still considered.

Make sure to adjust the column names and table names according to your actual data model.

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

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.