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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Penn
Resolver I
Resolver I

Anyway to put measures on both row and column in matrix?

Hi All,

 

I have a dataset looks like this.

ItemDivisionSub-divisionDateTypeAmount
A001BookTravel Book25/10/2019Revenue10
A001BookTravel Book25/10/2019Cost-5
A002BookTravel Book4/09/2019Revenue15
A002BookTravel Book4/09/2019Cost-5
A003GamePS4 Game2/10/2019Revenue5
A004GamePS4 Game3/10/2019Cost-4

 

And I have a strict requirement to convert this dataset into a matrix like below, which inevitably means I need to put measures on both the row and column. Is there any addon in market place that can achieve this?

Annotation 2019-10-25 161218.jpg

 

I understand that it is an easy task in Excel, but anyway we can do this in Power BI? Thanks.

1 ACCEPTED SOLUTION
Penn
Resolver I
Resolver I

Achieved this in SQL

 

Annotation 2019-11-04 122344.jpg

View solution in original post

3 REPLIES 3
Penn
Resolver I
Resolver I

Achieved this in SQL

 

Annotation 2019-11-04 122344.jpg

amitchandak
Super User
Super User

If you have a dataset where type is revenue and cost etc. Then create a measure for this month, last month and MOM. And use Matrix. In a matrix their symbol, which can drill you till last level.

 

Screenshot 2019-10-25 11.17.37.png

 

There is option to show values on row. But looking at your structure you do not need that.

 

Formula's can be

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date Filer]))
 Lst month Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date Filer],-1,MONTH))))

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Hi amitchandak,

 

Thanks for your post, however this doesn't exactly solve my question. Noted that in my dataset there are only two types "Revenue" and "Cost" and I need to report more types in the row like "Margin" and "Margin %".

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.