I created Calculation Member which one shows a percentage ratio transactions amount to concrete institution.
Case When IsEmpty ( [Measures].[Zlicz transakcje] )
Then Null
Else ROUND((( [Klient].[Instytucja].[Klient].CurrentMember,
[Measures].[Zlicz transakcje] )
/
( Root ( [Klient] ), [Measures].[Zlicz transakcje] )) *100, 2 )
End
The result of my query looks like:
Query: How to change MDX query to shows percentage usage for all institutions (except for "Brak instytucji") grouped in one rows (I mean one row with 13,05 value)?
Couple of things I'd recommend
CASE
- general rul-of-thumb is that IIF
is quicker. DIVIDE
function. Code would now be something like this:
IIF(
[Measures].[Zlicz transakcje] = 0
, NULL
, ROUND(
100 *
DIVIDE(
( [Klient].[Instytucja].[Klient].CurrentMember, [Measures].[Zlicz transakcje] )
, ( [Klient].[Instytucja].[All], [Measures].[Zlicz transakcje] )
)
, 2
)
You can create an aggregated member that excludes Brak instytucji:
AGGREGATE(
EXCEPT(
[Klient].[Instytucja].[Klient].MEMBERS
,[Klient].[Instytucja].[Klient].[Brak instytucji]
)
)
)
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.