Forum Discussion
ENGFAKAYODE
4 years agoHelper I
DAX measure comparison
Hello Everyone, I've 2 tables ; Product Dimension Table: Product Name - Product Category - Product Sub Category Bike Sporting Goods ...
- 4 years ago
Hi again,
You need to creat a measure not a calculated column:
SubCategory Sales = var _subcategory = SELECTEDVALUE('Table'[Prod Sub Category]) var _value = CALCULATE( sum('Table'[tab2.sales]), filter (ALL('Table'), 'Table'[Prod Sub Category]= _subcategory) ) return _valueDid I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC
onurbmiguel_
4 years agoPower Participant
hi again
change in line 8 :
... product sub category] in CurrentSubcategory
you are using the function "values" in the fisrt var so you will have muliples values.
another way is to change Values to Selectedvalue
try please
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC
ENGFAKAYODE
4 years agoHelper I
The columns are blank
- onurbmiguel_4 years agoPower Participant
Hi again,
You need to creat a measure not a calculated column:
SubCategory Sales = var _subcategory = SELECTEDVALUE('Table'[Prod Sub Category]) var _value = CALCULATE( sum('Table'[tab2.sales]), filter (ALL('Table'), 'Table'[Prod Sub Category]= _subcategory) ) return _valueDid I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC- ENGFAKAYODE4 years agoHelper I
Thanks