| |

VerySource

 Forgot password?
 Register
Search
View: 995|Reply: 4

Ask the writing of an MDX

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-5 16:00:02
| Show all posts |Read mode
I want to implement a proportion of the report, the current report is as follows
======================================================= =====
Cost
======================================================= =====
Total cost 200
Office expenses 200
Management fee 120
Utility bill 50
Phone charge 30
Stationery fee 100
Pencil 10
Paper 80
Folder 10
======================================================= ====

I want to add the proportion to achieve the following, how do I write mdx?

======================================================= =====
Cost ratio
======================================================= =====
Total cost 300 100%
Office expenses 200 66.67%
Management fee 120 60%
Utility bill 50 25%
Phone charge 30 15%
Stationery fee 100 33.33%
Pencil 10 10%
Paper 80 80%
Folder 10 10%
======================================================= ====
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-8-19 23:45:01
| Show all posts
You can create a Caculate Member in the Cube design,
MDX expression:
[Measures].[Percentage] = ([measures].[Fee], [Type].[CurrentMember])/([measures].[Fee], [Type].[CurrentMember].parent)

This is using MDX statements to query.
Select SetA on Columns, SetB on Rows
From CubeName
Where [Measures].[Percentage]

#
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-23 16:15:01
| Show all posts
Pay attention to the design of [cost] level.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Invalid IP Address

Post time: 2020-8-23 16:30:01
| Show all posts
with member [abc] as'([].currentmember, [measures].[])/([].currentmember.parent, [Measures].[]) format "%"'
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-23 20:15:01
| Show all posts
Create Member [Measures].[Expense Ratio] AS
'([Expense Type].Currentmember, [Measures].[Expense])/([Expense Type].[ALL Expense Type], [Measures].[Expense])'
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list