The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I need to write a calcuate (sum) using this filter.
I have tried to figure out a way to do this is DAX filter but it doesn't like parenthesis in the filter.
Any ideas would be very appreciated.
(Filter A = "b" or Filter B = "b") and Filter C = "x" and (filter D = "1" or filter D ="2")
Solved! Go to Solution.
Hello,
Thanks for the reply but it will not allow me to do what you advised. Below is the image of the error I get.
Hi @Anonymous ,
Try this measure.
Measure =
CALCULATE(
DISTINCTCOUNT('Main'[ID]),
FILTER('Main',
('Main'[ADMITSTATUS]="N"||'Main'[ETHNICITY]="N")
&&'Main'[CITIZEN]="Y"
)
)
If this doesn't work for you, would you mind sharing a sample data without privacy and tell me what data you want to filter out? Thanks in advance.
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
@Anonymous For and use && and For OR is || , use in for or of same filter
([Filter A] = "b" || [Filter B] = "b") && [Filter C] = "x" && ([filter D] in{ "1" ,"2"} )
Hello,
Thanks for the reply but it will not allow me to do what you advised. Below is the image of the error I get.
Hi @Anonymous ,
Try this measure.
Measure =
CALCULATE(
DISTINCTCOUNT('Main'[ID]),
FILTER('Main',
('Main'[ADMITSTATUS]="N"||'Main'[ETHNICITY]="N")
&&'Main'[CITIZEN]="Y"
)
)
If this doesn't work for you, would you mind sharing a sample data without privacy and tell me what data you want to filter out? Thanks in advance.
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Thanks that worked.
Hello,
Thanks for the reply but it will not allow me to do what you advised. Below is the image of the error I get.
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
11 | |
7 |