Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

measures by measures in matrix

Hi All,

 

I need to build something like the following:

last row and last column are calculated using other rows and columns.

Is the following something possible to build in powerbi?

Please advise.

 

matthewlee0904_0-1626825343807.png

 

 

1 ACCEPTED SOLUTION

Hello, thats a question of what you need to see the the matrix. is it two columns? thats a bit easier since its the difference between the 2. Is it 12 months? if so what difference do you want to see. The variance will be written into measure calculation. The syntax will be something like:

 

Income =

VAR Income=SUM( Table1, Income)
VAR IncomeFirstMonth = CALCULATE(Income,FIRSTNONBLANK(MonthDate))

VAR IncomeLastMonth= CALCULATE(Income,LASTNONBLANK(MonthDate))

 

RETURN

IF(HASONEVALUE(Date[Date]),Income,IncomeFirstMonth-IncomeLastMonth))

 

Have a look here for a really helpful collection of total  calcs which you should be able to rewrite to get what you need: https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

 

 

// if this is a solution please mark as such. Kudos always appreciated.

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

This depends upon the structure of your data.  Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
samdthompson
Memorable Member
Memorable Member

Hello, yes thats quite achieveable in a matrix.

 

1. Drag months on the column field then the three measures in the values section.

2. Alter the formatting for values to show vales on rows once you have added them. 

 

the Measures will be some thing like

 

Income = SUM( Table1, Income)

No of Cases = DISTINCTCOUNT( Table1, CaseID)

Incopme /No of Cases= [Income]/[No of Cases]

 

// if this is a solution please mark as such. Kudos always appreciated.
Anonymous
Not applicable

hi Thanks for the reply.

 

How about the variance column?

 

Hello, thats a question of what you need to see the the matrix. is it two columns? thats a bit easier since its the difference between the 2. Is it 12 months? if so what difference do you want to see. The variance will be written into measure calculation. The syntax will be something like:

 

Income =

VAR Income=SUM( Table1, Income)
VAR IncomeFirstMonth = CALCULATE(Income,FIRSTNONBLANK(MonthDate))

VAR IncomeLastMonth= CALCULATE(Income,LASTNONBLANK(MonthDate))

 

RETURN

IF(HASONEVALUE(Date[Date]),Income,IncomeFirstMonth-IncomeLastMonth))

 

Have a look here for a really helpful collection of total  calcs which you should be able to rewrite to get what you need: https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

 

 

// if this is a solution please mark as such. Kudos always appreciated.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.