Forum Discussion
CALCULATE function behaviour
- 3 years ago
Ranjith_96 if you understood it correctly, tell me what is the expected output of the following measure if you put it in the matrix visual. Try to answer it without actually testing it in your visual, If you are able to answer, it means you understood the concept.
ChairsSales = CALCULATE(SUM(Orders[Sales]),Orders[Category]="Furniture")
Ranjith_96 if you understood it correctly, tell me what is the expected output of the following measure if you put it in the matrix visual. Try to answer it without actually testing it in your visual, If you are able to answer, it means you understood the concept.
ChairsSales = CALCULATE(SUM(Orders[Sales]),Orders[Category]="Furniture")
- Ranjith_963 years ago
Helper I
Hi parry2k , I guess this DAX will give the sales values of respective subcategory wherever we have category as furniture, am i crct?
ChairsSales = CALCULATE(SUM(Orders[Sales]),Orders[Category]="Furniture")
- Ranjith_963 years ago
Helper I
parry2k ..so can u confirm is this how the calulate will execute for my DAX,
ChairsSales = CALCULATE(SUM(Orders[Sales]),Orders[Sub-Category]="Chairs")
refer the below image,
in the first row, Category = Furniture and SubCategory = Chairs so 328449
in the seond row, Category = Furniture and SubCategory = Chairs so 328449
in the third row, Category = Furniture, and SubCategory = Chairs so 328449
in the fourth row, Category = Furniture and SubCategory = Chairs so 328449
in the fifth row, Category = Office Supplies and Sub Cateogry = Chairs , so no matching so NULL