BLOG

FILTER context in Power BI(DAX)

13-08-2019  0 Comment(s)

the expression FILTER('InternetSales_USD', RELATED('SalesTerritory'[SalesTerritoryCountry])<>"United States") returns a table that is a subset of Internet Sales minus all rows that belong to the United States sales territory. The RELATED function is what links the Territory key in the Internet Sales table to SalesTerritoryCountry in the SalesTerritory table.

So, if we have this data

Row Labels Accessories Bikes Clothing Grand Total
2005   $1,526,481.95   $1,526,481.95
2006   $3,554,744.04   $3,554,744.04

 

SUMX(FILTER('InternetSales_USD', RELATED('SalesTerritory'[SalesTerritoryCountry])<>"United States") ,'InternetSales_USD'[SalesAmount_USD])

Comment Here

Comments

No Comments to Show

WE ALWAYS WORK WITH :