Forum Discussion
NEED HELP ALLEXCEPT function
- 5 years ago
Anonymous
Your example is the same as my first example. The field you are using in the table visual is from a dimension table (Products), so you need to write the expression as:
AllExcptProductName = CALCULATE(SUM('Order Details'[Sales]),ALLEXCEPT('Order Details',Products[ProductName]))
If I understand correctly, you are trying to calculate the sales per city and per country?
If you want to show the total sales per city you should use this probably: calculate(sum('Order Details'[Sales]),ALLEXCEPT(TABLENAME,TABLENAME[City]))
If you want to show the total sales per city you should use this probably: calculate(sum('Order Details'[Sales]),ALLEXCEPT(TABLENAME,TABLENAME[Country]))
Allexcept means that you are removing all filters, except the one you state in the Allexcept function.
At the moment I am not able to test, so let me know if this was what you where looking for
Ark1 im looking for Total sales per product name , how can i write using allexcept function?
- Ark15 years agoNew Member
Could you please share your file? I will have a look
- Anonymous5 years agoNot applicable
@Ark1 amitchandak you can check my pbix here https://github.com/hwpowerbi/Power-bi-Repository