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
nkasdali
Employee
Employee

disabling interaction using dax

Hi All,

 

I'm using several measures and displaying them in Card Visual, on the same page have also several slicers.

 

Do you know how I can do to disable the interaction between my slicer and my card using DAX in my measures?

 

Thanks

1 ACCEPTED SOLUTION

@nkasdali ,

 

I'm afraid dax can't disable interaction between visuals, ALL() function can only remove the filters in the filter context in dax expression. You need to use "visual interaction" in the format pane.

 

Community Support Team _ Jimmy Tao

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

View solution in original post

4 REPLIES 4
JarroVGIT
Resident Rockstar
Resident Rockstar

Use context changers like ALL(table), ALLEXCEPT(table, table[col1]), etc to escape the impact of slicers on measures.
For example, measure = CALCULATE ( SUM (table[Column]), ALL (table) ) will always result in the total sum of table[column] regardless of the context created by the current slicer selection.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @JarroVGIT 

I tried All, Allexpect ! but didn't work. You can see in the profile AAS is executing a DAX calculation on my measure when selecting a value in my slicer.

 

Knowing that I have 22 measures in 22 cards, my aim is to avoid to send useless queries to my AAS.

 

It works well by disabling the interaction in the "Format" view but want to do it using DAX.

 

Capture.JPG

@nkasdali ,

 

I'm afraid dax can't disable interaction between visuals, ALL() function can only remove the filters in the filter context in dax expression. You need to use "visual interaction" in the format pane.

 

Community Support Team _ Jimmy Tao

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

You can't, I am sorry. I see what you are trying to achieve. Upon changing the datamodel context by selecting a slicer, you don't want all measures to reevaluated if they aren't impacted. However, this is not how PowerBI works. When selecting a slicer, your datamodel is reevaluated and so are all your measures. You can't disable this behavior in DAX and can only change interaction from the Edit Interactions button in PBI Desktop.
Hope this answers your question,
Derro123




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.