Approach - Complex DAX

All -
Here is a DAX Measure from one of the Enterprise DNA videos (Customer Segmentation)

``````Profits by Customer Groups =
CALCULATE( [Total Profits],
FILTER( VALUES( Customers[Customer Name] ),
COUNTROWS(
FILTER( 'Customer Segmentation',
[Total Profits] >= 'Customer Segmentation'[Min] &&
[Total Profits] < 'Customer Segmentation'[Max] ) ) > 0 ) )
``````

Total Profits = [Total Sales] - [Total Costs]

Is there any easy way to go through something like this to best understand it? I get tripped up some times with some of these.

Thanks EnterpriseDNA Forum!

Hi @mbraun

I can understand that at times DAX can be really cheeky and takes a lot of time to process the logic. The best way i break down a logic from Sam’s video or from any dax calculation logic video/article is to break it in to pieces.
I hope you have heard of the Dax studio if not than download it from here

I would say spend some time on it . You can watch these you tube videos as how to use it.

Also, whenever you try to break a dax code to understand than always start from inside out .

Hope this help. Further, if you don’t understand any specific part of the above mentioned formula i will try to explain.

Regards,
Hemant

1 Like

One option might be to create a new table with Customer groups and use DAX for min and Max. In other words split this formula. In some cases, split helps in developing understanding but downside is more formulas make difficult to create visuals. There is always a balance.

Hi @mbraun. There’s a DAX Pattern post available which also includes many resources; hopefully one of these will help.
Greg

1 Like

Hi @mbraun, did the response provided by the contributors help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark the thread as solved. Thanks!