cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Re: Why is DAX multiplying rows when removing filters with ALL?

@AdamMarczak I would stay away from using IF condition as it can be expensive and can slow down the DAX calculation. May be on smaller dataset it is not a big but complex/larger dataset, it can be costly.






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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





AdamMarczak Frequent Visitor
Frequent Visitor

Re: Why is DAX multiplying rows when removing filters with ALL?

@parry2k understand but  i wonder how to avoid mentioned scenario in this case. I need to drop filters from related table and calculate SUM over Name column. How do i check for blank so I don't get empty rows like here.

Super User
Super User

Re: Why is DAX multiplying rows when removing filters with ALL?

@AdamMarczak the calculation I gave you will take care of it, did you tested it?






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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Super User
Super User

Re: Why is DAX multiplying rows when removing filters with ALL?

Hi @AdamMarczak ,

 

When having tables related you need to understand that you don't need to make the use of filter to make the calculations, if you get the context from the correct table the use of the filters especcially ALL will only give you unexpected results.

 

In you case a simple measure like SUM and the use of the manufacturer name from the table will give you the correct calculation no need to make this complicated.

 

Regards,

MFelix


Regards

MFelix


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

Proud to be a Datanaut!




AdamMarczak Frequent Visitor
Frequent Visitor

Re: Why is DAX multiplying rows when removing filters with ALL?

@MFelix in my case I need to have manufacturer and area columns in my table so my context is too narrow so I need to drop some filters. I can't do this without ALL since my filter context is already A, Adam, 1 so my SUM will return 1 if I dont drop filter on Adam (Manufacturer) and 1 (Area).

 

@parry2k I did, it kinda broke my mind but I guess it works really well because of how divide as IF BLANK return 1 otherise return blank. Clever. I have 600 to 2 TB models so I will test the performance. Clever trick indeed. Thanks!

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)