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
Giada_Togliatti
Post Patron
Post Patron

dax formula that ignores some column selection

Hi,

I have this formula:

 

CALCULATE( SUM(Orders[Sales]), FILTER( Orders, MONTH(Orders[Date]) = [mese corrente] ) )
 
I need to put inside the formula something that tell me that I must ignore selection of the field region.
How can I insert inside the formula?
Thank you
1 ACCEPTED SOLUTION

@Giada_Togliatti 

Please try below measure. This should work.

sales per mese corrente che ignora regione 2 = 
VAR mese = [mese corrente]
RETURN
CALCULATE( SUM(Orders[Sales]), ALL(Orders[Region]), MONTH(Orders[Date]) = mese )

021601.jpg

Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

View solution in original post

8 REPLIES 8
lkalawski
Memorable Member
Memorable Member

Hi @Giada_Togliatti 

I don't know details, but you can add ALL function to the formula:

CALCULATE( SUM(Orders[Sales]), FILTER( Orders, MONTH(Orders[Date]) = [mese corrente] ), ALL(Region) )

 By using it you will ignore any Region filters.

 

PBI_SuperUser_Rank@1x.png Proud to be a Super User.
If I helped, please accept the solution and give kudos
Linkedin

 

@lkalawski , hi, I've tried with all but if I select different region in the visualization it changes the same

@Giada_Togliatti 

Can you share more information and share .pbix file or sample data? It will help to find a solution for your problem.

 

PBI_SuperUser_Rank@1x.png Proud to be a Super User.
If I helped, please accept the solution and give kudos
Linkedin

 

@lkalawski I don't see the option for sharing the pbix, what I need is a measure that doesn't change based on another field in a filter slicer, I used edit interation and it works but I would like to know if there is a way to do in dax too, thank you

@Giada_Togliatti ,

Please add to Onedrive or some another storage and share the link here. 

Function All allows you to remove the filter and get all the data from the table or the column, so I need to see your file and structure to check it. 

 

PBI_SuperUser_Rank@1x.png Proud to be a Super User.
If I helped, please accept the solution and give kudos
Linkedin

 

@lkalawski , this is the link of pbix file

https://drive.google.com/file/d/1kaX1PWMby_744KrVLAQxSREKI9oEprvv/view?usp=sharing

 

Now it works because I edit interation and deactivate the interation between slicer and the second card, but I would like to do with dax

@Giada_Togliatti 

Please try below measure. This should work.

sales per mese corrente che ignora regione 2 = 
VAR mese = [mese corrente]
RETURN
CALCULATE( SUM(Orders[Sales]), ALL(Orders[Region]), MONTH(Orders[Date]) = mese )

021601.jpg

Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

Thanks, it works!

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.