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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hello everyone, thank you for your help.
I have a source that gets a JSON similar to this:
[
{
"dataId": 1,
"dataName": "Producto A",
"labels": [
{
"labelId": 101,
"label": "Almacen"
},
{
"labelId": 201,
"label": "Natura"
},
{
"labelId": 301,
"label": "Gramos"
}
]
},
{
"dataId": 2,
"dataName": "Producto B",
"labels": [
{
"labelId": 102,
"label": "Alimentos frescos"
},
{
"labelId": 201,
"label": "Natura"
},
{
"labelId": 302,
"label": "Litros"
}
]
},
{
"dataId": 3,
"dataName": "Producto C",
"labels": [
{
"labelId": 101,
"label": "Almacen"
},
{
"labelId": 202,
"label": "Knorr"
},
{
"labelId": 303,
"label": "Kilos"
}
]
}
]
Basically it is a list of products and each product has a series of labels or characteristics that then serve me to filter and select the desired ones. In order to use the "labels" element I must expand the values of that column, which generates three records for each product. My goal is that, from the dashboard view, you can select different labels and be able to restrict the view to the products that have all those labels. That is label1 AND label2 AND label3, etc.... However when selecting the labels I get a behavior similar to an OR: label1 OR label2 OR label3. This is not the desired compromise.
For example I want to obtain all the products of ALMACEN and the NATURA brand. However I get all the products of ALMACEN + all the products of the KNORR brand. Instead of restricting to both features, it adds to me the results of each.
Someone can guide me what I should do or how I should organize my data to meet the objective of filtering with the logic of AND and not OR.
I hope it has become clear what the problem is and what I am needing.
Thank you again.
For example I want to obtain all the products of ALMACEN and the NATURA brand.
Unfortunately there is a disconnect between everyday language and mathematical language. Your example above in math terms would be
[Label]="Almacen" || [Label] = "Natura"
IE it is an OR statement, not an AND statement.
Now - in Power BI you cannot combine filters from different columns into an OR statement. They will always be applied as AND. And conversely, you cannot filter items from the same column via AND because that would get you an empty result.
Note that you can of course override all this with measures. But you better be very clear about your business rules and how they translate into math language.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 52 | |
| 41 | |
| 32 | |
| 26 | |
| 24 |
| User | Count |
|---|---|
| 133 | |
| 118 | |
| 56 | |
| 43 | |
| 43 |