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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

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)
table 1table 1

 

table 2table 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
Anonymous
Not applicable

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.