cancel
Showing results for 
Search instead for 
Did you mean: 
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
Super User II
Super User II

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.

View solution in original post

Thanks, it works!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors