cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sach18 Helper III
Helper III

Add extra columns in matrix visual

Sorry if there is any similar issue. I am stuck with an issue and need this issue solve soon. Please let me know any suggestions or tips and tricks or anyway i can clear this.

I have table1 and table2 where table1 is transaction table and table2 is lookup table. (Note the values in db are dummy data)
test1.JPGtable 1

 

test2.JPGtable 2

We have calculated columns for NetSales and GrossMargin by below 
NetSales = Sample * Rate1 where Table1(Brand) = Table2(Brand) and Category = NetSales
Gross Margin = Sample * Rate1 where Table1(Brand) = Table2(Brand) and Category = Gross Margin


We have created tables for Sample, Trx, NetSales and Gross Margin like below
sampleTable = SUMMARIZE( Table1, Table1[Date], Table1[Territory], Table1[Region], Table1[Brand], "Value" , SUM(Table1[Sample])
added a column Type = "Sample" to the sampleTable.
similarly we have created table for Trx, NetSales and GrossMargin and added Type as Trx, NetSales and GrossMargin respectively.

 

Now we have created a new table 
FinalTable = UNION(SampleTable, TrxTable, NetSalesTable, GrossMarginTable)
Using this FinalTable, I have created calculated columns from January to 2019YTD.
I have created a matrix visual as below 
types.JPG

 visual.JPG

 

Now I need to create a matrix where in place of Types I need to display the stats the same way as above
So I have created the measures for stat1 and stat2.
Stat1 = Trx/Sample
Stat2 = NetSales/Trx
test3.JPG
stat2.JPG

 


Now I want to add the columns 2018YTD, 2019YTD, Increase(Decrease) and Percent columns in the above  Statistics visual. 
Can anyone help me with that. Thanks in advance. 

1 REPLY 1
Highlighted
sach18 Helper III
Helper III

Re: Add extra columns in matrix visual

Hello All,

Just need to know if this is possible. Please do let me know .

Measure Stat1 = SUM(Table1[Trx]) / SUM(Table1[Samples])
Measure Stat2 = SUM(Table1[NetSales]) / SUM(Table1[Samples])

I have YTD and LYTD measures also.

Can I get the result in the matrix as shown below. Please let me know with the solution. 

StatisticNovemberDecemberCurrent YTDPrevious YTDChange in YTDPercent
Stat1  ??  
Stat2  ??  


Note Stat1, Stat2, CurrentYTD, PreviousYTD ,Change in YTD and Percent are all measures. If it is not possible to do with measures then suggest me with some other way. I have been trying this from many days. Thanks in advance.

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors