Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
for the slicer in power bi is an "and" operator possible?
So when you select two possibilities on a slicer its always one OR the other.
Is it possible for a slicer thats its the one AND the other.
so for example when I select "FÖSTEN KG" and "GERATECH" I only receive the items with both criterias
Thanks in advance.
Solved! Go to Solution.
Hi, @Companyuser101
First, you can turn on the multi-select feature of Slicer:
Slicer setting>>Seletion>>Muti_seleted
In addition, you can use the following DAX to calculate items that belong to the slicer selection:
sales amount =
VAR _silceritem = SELECTCOLUMNS('Table',"product",'Table'[Product])
RETURN
CALCULATE(SUM('Table'[sales]),FILTER('Table','Table'[Product] IN _silceritem))
This DAX expression mainly uses the seletcolumns function to return the items selected by the slicer, and then uses the IN function to determine whether the current field is in the items selected by the slicer, and if so, then calculate the sales.
SELECTCOLUMNS function (DAX) - DAX | Microsoft Learn
The IN operator in DAX - SQLBI
SELECTCOLUMNS – DAX Guide - SQLBI
I've provided the PBIX file used this time below.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Share a dummy dataset and for that dataset, show the expected result.
Hi, @Companyuser101
First, you can turn on the multi-select feature of Slicer:
Slicer setting>>Seletion>>Muti_seleted
In addition, you can use the following DAX to calculate items that belong to the slicer selection:
sales amount =
VAR _silceritem = SELECTCOLUMNS('Table',"product",'Table'[Product])
RETURN
CALCULATE(SUM('Table'[sales]),FILTER('Table','Table'[Product] IN _silceritem))
This DAX expression mainly uses the seletcolumns function to return the items selected by the slicer, and then uses the IN function to determine whether the current field is in the items selected by the slicer, and if so, then calculate the sales.
SELECTCOLUMNS function (DAX) - DAX | Microsoft Learn
The IN operator in DAX - SQLBI
SELECTCOLUMNS – DAX Guide - SQLBI
I've provided the PBIX file used this time below.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
123 | |
76 | |
62 | |
50 | |
50 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |