REMOVEFILTERS
Si applica a: Calcolo visivo misura tabella calcolata colonna calcolata
Cancellare i filtri dalle tabelle o dalle colonne specificate.
Sintassi
REMOVEFILTERS([<table> | <column>[, <column>[, <column>[,…]]]])
Parametri
Termine | Definizione |
---|---|
table | Tabella in cui cancellare i filtri. |
colonna | Colonna in cui cancellare i filtri. |
Valore restituito
N/D. Vedere la sezione Osservazioni.
Osservazioni:
Si può usare REMOVEFILTERS solo per cancellare i filtri, ma non per restituire una tabella.
Questa funzione non è supportata per l'uso nella modalità DirectQuery se usata in colonne calcolate o nelle regole di sicurezza a livello di riga.
Esempio 1
Query DAX
DEFINE
MEASURE FactInternetSales[TotalSales] = SUM(FactInternetSales[SalesAmount])
MEASURE FactInternetSales[%Sales] = DIVIDE([TotalSales], CALCULATE([TotalSales],REMOVEFILTERS()))
EVALUATE
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL(DimProductCategory[EnglishProductCategoryName], "IsGrandTotal"),
"TotalSales", [TotalSales],
"%Sales", [%Sales]
)
ORDER BY
[IsGrandTotal] DESC, [TotalSales] DESC
Resi
DimProductCategory[EnglishProductCategoryName] | [IsGrandTotal] | [TotalSales] | [%Sales] |
---|---|---|---|
Riga1 | Vero | 29358677.2207 | 1 |
Bikes | False | 28318144.6507 | 0.964557920570538 |
Accessori | False | 700759.96 | 0.023868921434441 |
Clothing | False | 339772.61 | 0.0115731579950215 |
Esempio 2
Query DAX
DEFINE
MEASURE FactInternetSales[TotalSales] = SUM(FactInternetSales[SalesAmount])
MEASURE FactInternetSales[%Sales] = DIVIDE([TotalSales], CALCULATE([TotalSales],REMOVEFILTERS(DimProductSubcategory[EnglishProductSubcategoryName])))
EVALUATE
SUMMARIZECOLUMNS(
DimProductCategory[EnglishProductCategoryName],
DimProductSubcategory[EnglishProductSubcategoryName],
"TotalSales", [TotalSales],
"%Sales", [%Sales]
)
ORDER BY
DimProductCategory[EnglishProductCategoryName] ASC,
DimProductSubcategory[EnglishProductSubcategoryName] ASC
Resi
DimProductCategory [EnglishProductCategoryName] | DimProductSubcategory [EnglishProductSubcategoryName] | [TotalSales] | [%Sales] |
---|---|---|---|
Accessori | Bike Racks | 39360 | 0.05616759 |
Accessori | Bike Stands | 39591 | 0.05649723 |
Accessori | Bottles and Cages | 56798.19 | 0.08105228 |
Accessori | Cleaners | 7218.6 | 0.0103011 |
Accessori | Fenders | 46619.58 | 0.06652717 |
Accessori | Helmets | 225335.6 | 0.3215589 |
Accessori | Hydration Packs | 40307.67 | 0.05751994 |
Accessori | Tires and Tubes | 245529.32 | 0.35037578 |
Bikes | Mountain Bikes | 9952759.564 | 0.35146228 |
Bikes | Road Bikes | 14520584.04 | 0.51276608 |
Bikes | Touring Bikes | 3844801.05 | 0.13577164 |
Clothing | Cappelli | 19688.1 | 0.05794493 |
Clothing | Gloves | 35020.7 | 0.10307099 |
Clothing | Jerseys | 172950.68 | 0.5090189 |
Clothing | Pantaloncini | 71319.81 | 0.20990453 |
Clothing | Calzini | 5106.32 | 0.01502864 |
Clothing | Vests | 35687 | 0.10503201 |