Forum Discussion
DAX help with a conditional classifer
- 9 years ago
I still can't understand your logic. In your Dim T_Bunch table, your RunCode and Bunch is 1-to-1 relationship.
What do you mean "RunCode = 104" AND "Bunch Code=5"?
If you are counting the invoices which matches your condition, can you explain why you get those results in the bottom table?
Regards
I still can't understand your logic. In your Dim T_Bunch table, your RunCode and Bunch is 1-to-1 relationship.
What do you mean "RunCode = 104" AND "Bunch Code=5"?
If you are counting the invoices which matches your condition, can you explain why you get those results in the bottom table?
Regards
Yes, Invoice counts is the goal.
Invoice Units = CALCULATE( COUNTX( FILTER('RunningTbl', 'RunningTbl'[bc]="104"), 'RunningTbl'[invoice]))
For unit counts... I need to aggregate the data table by a grouping (for example of Invoice 123 = 104 AND TG, then grouping 5 and classfied by the INSID color of the TG = Blue)
I went to look for SQL examples and found a DAX Dynamic Segmentation that is an example of a numeric classifier. If I can port this over from a numeric range to a alpha index in a parameter table, I may have a way.
http://www.daxpatterns.com/dynamic-segmentation/
https://powerpivotpro.com/2014/11/new-twist-for-dynamic-segmentation-variable-grain-range-selection
I know I am making this harder than it needs to be.
In plain english, I want to test Invoices and if they known combnations of RunCodes to classify them as Reflections or Mirrors. Then count\total classification as the Insid color for the RunCodes in t_group 5.