Adding multiple columns in Matrix columns

Sandeep3072

New Member
Joined
Jul 22, 2019
Messages
4
Hi All,

I am new to power BI and I have requirement to do in power BI where I need to show the some of key metrics in matrix format.

Here is the my requirement.

Well I am working for the Textile company where in I need to prepare the reports using Power BI and unfortunately I could not make it. I use matrix for the showing the differences of reports between 2018 and 2019.


Please check the below screen shot where I need to get the output like mentioned screenshot.

1611899481385.png


Please note that %Change in the above table is a measure which I had written % change = DIVIDE(CALCULATE(SUM(Table1[<wbr>Reports]),Table1[Year]=2019)-<wbr>CALCULATE(SUM(Table1[Reports])<wbr>,Table1[Year]=2018),
CALCULATE(SUM(Table1[Reports])<wbr>,Table1[Year]=2018))

When I am trying to add the same measure in my matrix the % change showing
for the both 2018 and 2019 years and I need it at the end of matrix.


1611899543733.png



You may check the my visualization pane to verify the rows and columns.

Is there any work around for the same issue and I've trying itfor a long time and finally seeking for your help.

Thanks for your support.
 
Last edited by a moderator:

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
It seems your images didn't post on either thread. This makes it difficult for people to help you. I recommend you see if you can sort that out as there are lots of people willing to help for free - but you have to make it easy for them. You issue is that you have put year on the columns in your report and also a measure. This creates 2 levels of data. The top level is the year and underneath that is the measure. In your case, the years are 2018 and 2019, and the measure is simply showing the % change for 2019 vs 2018, hence the problem. Better to write 3 measures.

Total 2018 = CALCULATE(SUM(Table1[Reports])<wbr style="color: rgb(0, 0, 0); background-color: rgb(250, 250, 250);">,Table1[Year]=2018)
Total 2019 =
CALCULATE(SUM(Table1[Reports])<wbr style="color: rgb(0, 0, 0); background-color: rgb(250, 250, 250);">,Table1[Year]=2019)
% change = DIVIDE([Total 2019] -[Total 2018],[Total 2018])

If you add these 3 measures, it will be at a single level and hence it will do what you want.

Better still, write these measures
Code:
Total This Year = VAR ThisYear = max[COLOR=#000000](T[/COLOR][COLOR=#000000]able1[Year])[/COLOR][COLOR=#000000]
                         RETURN CALCULATE(SUM(Table1[Reports])[/COLOR]<wbr style="color: rgb(0, 0, 0); background-color: rgb(250, 250, 250);">[COLOR=#000000],Table1[Year]=ThisYear)
[/COLOR]Total Last Year = VAR LastYear = max[COLOR=#000000](T[/COLOR][COLOR=#000000]able1[Year][/COLOR][COLOR=#000000])-1
                         RETURN CALCULATE(SUM(Table1[Reports])[/COLOR]<wbr style="color: rgb(0, 0, 0); background-color: rgb(250, 250, 250);">[COLOR=#000000],Table1[Year]=LastYear)[/COLOR][COLOR=#000000]
[/COLOR][COLOR=#000000]% change = DIVIDE([Total This Year] -[Total Last Year],[Total Last Year)[/COLOR]

Add the 3 measures to the matrix and add a slicer from the year column. When you select the year in the slicer, it will update to show you the selected year and prior year
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top