Forum Discussion
Stevo164
8 years agoRegular Visitor
selective sum
Hello everybody, i have the following table SALES that shows the sales per department . COD_STORE DES_STORE COD_DEPARTMENT DES_DEPARTMENT SALES DATE 0002 STORE_1 0002051 DEPARTMENT_1...
- 8 years ago
I solved it creating the following measures:
- Check_tot1= CALCULATE(COUNT('Sales'[Sales]);'TRANSCODING_DEP_SEG';'TRANSCONDING_DEP_SEG'[CONDITION_RED]="1")
- Sales_Dep13= CALCULATE(SUM('SALES'[SALES]);'SALES'[DES_DEPARTMENT])="13")
Whit the two new measures I've finally created the measure that can solve my problem:
- Sales_Seg = IF('SALES'[Check_tot1]>0;'SALES'[Sales_Dep13];SUM('SALES[SALES]))
Thanks everyone for the support.
Anonymous
8 years agoNot applicable
Stevo164,
Create measure using DAX below.
Measure = IF(MAX(TRANSCODING_DEP_SEG[CONDITION_RED])=1;MAX(Sales[SALES]);SUM(Sales[SALES]))
Regards,
Lydia
Stevo164
8 years agoRegular Visitor
Thank you Anonymous for your kind answer, but it's not working for me, because I have the sales per day and it will show the max sales in a day.