Forum Discussion
tkfisher
4 years agoFrequent Visitor
Segmentation Help
Hi All, I require some help with detailed segmentation measures. I used the link below to help guide me, but my issue is a little more complex as my "segmentation rules" differ for each item numb...
- 4 years ago
Got it! As normal, was overcomplicating the DAX needed. Here is the corrected code:
Revenue Segmentation =SUMX (VALUES ( 'Price List Updated'[Item Number] ),VAR ItemsInPriceLevel =CALCULATETABLE (FILTER ('Price List Updated',VAR SalesOfItem = [Spend @ actual]VAR ItemASP = [ASP (calculated)]VAR IsItemInPriceLevel =NOT ISBLANK ( ItemASP ) && 'Price List Updated'[Lowest Price] <= ItemASP&& ItemASP < COALESCE ( 'Price List Updated'[Highest Price], 99999999999999 )RETURNIsItemInPriceLevel))RETURNCALCULATE ([Spend @ actual],KEEPFILTERS ( ItemsInPriceLevel ),NOT ISBLANK ( Item_Master[Item #] )))
tkfisher
4 years agoFrequent Visitor
I have a .pbix file that replicates my issue, what is the best way to share it on this forum?