Forum Discussion
Flag all IDs from a certain category
- 2 years ago
First image is without any selection in the slicer. As you can see the flag is working fine for the Products that have Details as "Discounted".
Second image AAA2 product is selected and the flag shows 0 for everything.
Third Image AAA3 product is selected amd the flag shows 1 for AAA3.
I hope that this will help you or a least drive you to the right path! - 2 years ago
Try this:
Flag = VAR _table = SUMMARIZE ( 'Fact', 'Fact'[ProductID], dim[Subcategory], dim[Details], "new column", IF(CONTAINSSTRING(dim[Details],"Discounted"),1,0)) VAR _flag= IF(MAXX(SUMMARIZE(_table,dim[Subcategory],[new column]),[new column])=1,"Discounted","Non Discounted") RETURN _flagNow if a product has "Discounted" the entire Subcategory is "Discounted".
First image is without any selection in the slicer. As you can see the flag is working fine for the Products that have Details as "Discounted".
Second image AAA2 product is selected and the flag shows 0 for everything.
Third Image AAA3 product is selected amd the flag shows 1 for AAA3.
I hope that this will help you or a least drive you to the right path!
- ekoland2 years agoFrequent Visitor
Try this:
Flag = VAR _table = SUMMARIZE ( 'Fact', 'Fact'[ProductID], dim[Subcategory], dim[Details], "new column", IF(CONTAINSSTRING(dim[Details],"Discounted"),1,0)) VAR _flag= IF(MAXX(SUMMARIZE(_table,dim[Subcategory],[new column]),[new column])=1,"Discounted","Non Discounted") RETURN _flagNow if a product has "Discounted" the entire Subcategory is "Discounted".