Forum Discussion
same measure in every pages
Thanks for the suggestion. However I dont really understand what you are saying. But the reason why i need to do the measure is I have to make a matrix table at the end with using the measure as the value in the matrix table. Or could show me the instruction?
Thanks
Hi CTan42,
As the cs_skit said, you can create a disconnected table as follows. Create a slicer including [TableName].
Then create a measure using the formula.
CurrentMonth = SWITCH(CALCULATE(FIRSTNONBLANK(NewTable[TableName],NewTable[TableName]),ALLSELECTED(NewTable)),
"A", sum('Table A'[Revenue]),
"B", sum('Table B'[Revenue]),
"C", sum('Table C'[Revenue]),
"D", sum('Table D'[Revenue]),
"E", sum('Table E'[Revenue]),
)
When you select "A" in slicer, it will calculate the sum('Table A'[Revenue]), when you select "B", it will calculate sum('Table B'[Revenue]) and so on.
More details, please review this article.
Best Regards,
Angelia
- CTan429 years ago
Helper II
v-huizhn-msft thanks for the suggestion. However, my data is complicated. The reason why I do this measure is i have to use this measure into another measure. Below are my full measure for 1 table:
1. CurrentMonth = SUM('A'[Revenue])
2. PreviousMonth = CALCULATE('A'[CurrentMonth], PREVIOUSMONTH('A'[Date]))
3. LastYearMonth = CALCULATE('A'[CurrentMonth], SAMEPERIODLASTYEAR('A'[Date]))
4. CurrentMonth/PreviousMonth = 'A'[CurrentMonth] - 'A'[PreviousMonth]
5. CurrentMonth/LastYearMonth = 'A'[CurrentMonth] - 'A'[LastYearMonth]
As power bi doesnt allow me use the same measure name, so atm i using different measure name in every table (eg. A<CurrentMonth>, B<CurrentMonth>). What I hope to do is just have all measure are having the same name. Is there anyway to make it better?
thanks.
- v-huizhn-msft9 years ago
Microsoft Employee
Hi CTan42,
Unfortunately, we are unable to use the same name for different measures. Usually, we can not recognize each measure's calculation if they have same name.
Best Regards,
Angelia