- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Matrix: Combine sales per month columns and measures
Hi all,
Imagine I have a table like this:
Company Name | Invoice Date | Price |
A | 01-01-2019 | 100 |
A | 01-02-2019 | 130 |
A | 01-03-2019 | 140 |
A | 01-04-2019 | 120 |
A | 01-05-2019 | 130 |
A | 01-06-2019 | 110 |
A | 01-07-2019 | 100 |
A | 01-08-2019 | 140 |
A | 01-09-2019 | 520 |
A | 01-10-2019 | 200 |
A | 01-11-2019 | 120 |
A | 01-12-2019 | 345 |
A | 01-01-2020 | 245 |
A | 01-02-2020 | 200 |
Then I put that in a matrix like this:
Which is fine. However, I would like to - AFTER the date columns, to be able to put some measures. I would like to put a measure for: "FY Sales LY" , "Sales LTM", "Diff LY vs LTM". But I can't seem to make that work. Then it puts it under each month if I put it as values. Is it possible in any way? My output I want is something like this:
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I updated it so that it handles all months, I was just getting it to work. Just requires copying and pasting a bunch of code and tweaking them for each month. Attached.
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attached a possible path to a solution.
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! I just tried it and seems to work alright - however it is made just for january right? How do I make it, if it has to take "any month" last year, and the YTD Months this year?
So lets say - from Jan-19 to whatever current month always?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I updated it so that it handles all months, I was just getting it to work. Just requires copying and pasting a bunch of code and tweaking them for each month. Attached.
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a million!
the last thing is that it sorts the months A-Z, how can I alter that? I have tried without luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad it works!! Honestly, I thought that it came out way too convoluted to be of use but it was the only way I could think of to do what you wanted without trying to smash two visuals together.
I added a sorting column to the data and did a "Sort By" column for Value 2 column. Updated PBIX.
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the most complicated measure I have ever had to be honest 😉
But it works! Only limitation is that it is not possible to do "sorting" by clicking on the columns. But that is just how it is!
Thanks a million @Greg

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
07-26-2024 12:03 AM | |||
05-16-2024 06:14 AM | |||
12-12-2023 08:42 PM | |||
04-23-2024 11:55 AM | |||
06-18-2024 03:20 AM |
User | Count |
---|---|
137 | |
107 | |
84 | |
59 | |
46 |