简体   繁体   中英

MDX Query: How to use where condition in query using filter()

Need Suggestions for below mdx query. It's giving syntax error. trying to calculate total sales where pop2019 larger than 5000 & GDPgrowth more than 1

Schema link

SELECT
{[Measures].[Sales]} ON 0,
{[Dim Company Info].[LOC].ALLMEMBERS} ON 1
FROM [Database] where (filter ([Dim Company Info].[Loc].members],[Measures].[pop19]>5000, [dim company info].[loc].members,[measures].[gdp growth]>1)

Make the corrections to your query

SELECT {[Measures].[Sales]} ON 0, {[Dim Company Info].[LOC].ALLMEMBERS} ON 1 FROM [Database] where (filter ([Dim Company Info].[Loc].members],[Measures].[pop19]>5000, [dim company info].[loc].members,[measures].[gdp growth]>1)

SELECT
{[Measures].[Sales]} ON 0,
{
filter([Dim Company Info].[LOC].ALLMEMBERS,[Measures].[pop19]>5000 and [measures].[gdp growth]>1)
}

ON 1
FROM [Database] 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM