Forum Discussion
misul
8 years agoHelper I
Dynamic Segmentation - with duplicate rows
Hi, I am trying to follow this blog post about Dynamic Segmentation. https://www.daxpatterns.com/dynamic-segmentation/ I am stuck on one point - what to do when there are duplicate transactions...
- 8 years ago
I have used this MEASURE in the LookUp Table
Measure = VAR mysales = CALCULATE ( SUM ( Table1[Sales] ) ) RETURN CALCULATE ( SUM ( Table1[Sales] ), FILTER ( VALUES ( Table1[Product] ), mysales >= SELECTEDVALUE ( CategoryLookup[Lower] ) && mysales < SELECTEDVALUE ( categoryLookup[Upper] ) ) )
misul
8 years agoHelper I
Zubair_Muhammad Many thanks!!!!!! This seems to work.
I will apply it to my data (which has more rows and more granularity) ... and hopefully it will still work.
misul
8 years agoHelper I
Zubair_Muhammad I celebrated too early. The current setup doesn't allow me to count the number of rows in each category, which is my final goal.
for example: How many products with Sales <15 in 2017 in Region North?