Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I want to write a dax formula for calculating volume, by filtering out sales group 011, 010, 009.
After that I want to filter out below values from the above mesaure:
filter out customername and below are my customer name that I want to filter out and also fiter out 010.
Filter out
Customer A
Customer B
How to write this dax in order to get correct result?
Solved! Go to Solution.
In your statement above you are INcluding all values by sales group
try
Measure = CALCULATE(SUM(ZSD_MAT_MARGIN_Q003[Sales Volume KL]), FILTER(ZSD_MAT_MARGIN_Q003,
(ZSD_MAT_MARGIN_Q003[Sales group.Sales group Level 01]= "011" || ZSD_MAT_MARGIN_Q003[Sales group.Sales group Level 01.Key]= "010" || ZSD_MAT_MARGIN_Q003[Sales group.Sales group Level 01.Key]= "009") && [Customer] <> "Value A" && [Customer] <> "Value B"
))do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi @Anmolgan
data model is not clear from your definition, but try something like
Measure =
CALCULATE(
SUM([Value]);
FILTER(ALL('Table');NOT ('Table'[Sales Group] IN {"009","010","011"}) && NOT('Table'[Sales Group] IN {"Customer A","Customer B"}))
)do not hesitate to give a kudo to useful posts and mark solutions as solution
@az38 I had created below measure for filtering out sales group
does your table ZSD_MAT_MARGIN_Q003 have a relationship with Customer table?
If so, it could be enough to add in filter statement || RELATED([Customer]) = "Value A" like this
Measure = CALCULATE(SUM(ZSD_MAT_MARGIN_Q003[Sales Volume KL]), FILTER(ZSD_MAT_MARGIN_Q003, ZSD_MAT_MARGIN_Q003[Sales group.Sales group Level 01]= "011" || ZSD_MAT_MARGIN_Q003[Sales group.Sales group Level 01.Key]= "010" || ZSD_MAT_MARGIN_Q003[Sales group.Sales group Level 01.Key]= "009" || RELATED('Customer Table'[Customer]) = "Value A" || RELATED('Customer Table'[Customer]) = "Value B"))do not hesitate to give a kudo to useful posts and mark solutions as solution
@az38 Everything is present in my table, I only have 1 table, why I should use RELATED I dont want to include those values in my existing dax, I want to exclude those values.
In your statement above you are INcluding all values by sales group
try
Measure = CALCULATE(SUM(ZSD_MAT_MARGIN_Q003[Sales Volume KL]), FILTER(ZSD_MAT_MARGIN_Q003,
(ZSD_MAT_MARGIN_Q003[Sales group.Sales group Level 01]= "011" || ZSD_MAT_MARGIN_Q003[Sales group.Sales group Level 01.Key]= "010" || ZSD_MAT_MARGIN_Q003[Sales group.Sales group Level 01.Key]= "009") && [Customer] <> "Value A" && [Customer] <> "Value B"
))do not hesitate to give a kudo to useful posts and mark solutions as solution
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 101 | |
| 76 | |
| 56 | |
| 51 | |
| 46 |