I am bringing detailed data to Tabular cube(Model is denormalized..One table in model having various attributes A,B,C,D and measures).I want to calculate some measures(Sales, Unit Price) by grouping on A.B.C. On top of that i want to calculate few measures on grouping of B.C.D and first level measures(sales,unit price) will be used to calculate the second level(new) measures..This is what we can achieve by using sub queries in sql. How to write them in dax.
Evaluate GROUPBY( ADDCOLUMNS( GROUPBY(
EMP,
EMP[Visitid],EMP[Identifier],EMP[Specifier],EMP[SystemId],EMP[Login]
) ,"Status", IF([Min_ResponseId]=88,"N","Y"),
"Resolved", [Max_StatusId],
"Max_createdate",Max(EMP[CreateDate])
),
EMP[Login],EMP[Identifier],EMP[Specifier],
"Accepted",MAXX( CURRENTGROUP (), IF([Resolved]=7 && [Status]="Y",1,0) )
)