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.
Hi,
I'm trying to get a difference of Years in a dynamic Matrix.
The output in the screenshot below comes from the following formula, and is not the intended result.
CALCULATE(
MINX(GROUPBY('Helivalues Transaction History','Helivalues Transaction History'[Sale Year]),'Helivalues Transaction History'[Sale Year]),
FILTER(
'Helivalues Transaction History',
'Helivalues Transaction History'[Sale Year] =
MINX(GROUPBY('Helivalues Transaction History','Helivalues Transaction History'[Sale Year]),'Helivalues Transaction History'[Sale Year])
)
)
From the above, I'd want the values in the matrix, going from left to right to be:
0, 1, 2, 3, 4, 5, 7. . . . (note that the 6 is missing because the year 2014 has no data in it)
but in order to do that, I need to return, in this example "2008" to subtract. But the above formula was intended to put 2008 in every cell, rather than the corresponding Column header.
Thanks in advance for any help!
Solved! Go to Solution.
@mrothschild change measure to this:
Starting Sales Year =
CALCULATE (
MIN ( 'Helivalues Transaction History'[Sale Year] ),
ALLSELECTED ( 'Helivalues Transaction History'[Sale Year] )
)
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@mrothschild change measure to this:
Starting Sales Year =
CALCULATE (
MIN ( 'Helivalues Transaction History'[Sale Year] ),
ALLSELECTED ( 'Helivalues Transaction History'[Sale Year] )
)
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Sorry @parry2k one more quick question related to this. The same way I'm returning 2008, 2009, etc. as the constant earliest year based on the slicer with ALLSELECTED()
how am I able to retrieve a non-self-referential number associated with the same 2008, 2009, etc. For example how can I get the earliest [zzAverage Unit Current Price. . . ] associated with a given row to consistently appear in the matrix?
Thanks!
@mrothschild try this measure:
Starting Sales Year =
CALCULATE (
MIN ( 'Helivalues Transaction History'[Sale Year] ),
REMOVEFILTERS ( 'Helivalues Transaction History'[Sale Year] )
)
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks for that @parry2k ,
but when I slice the Sale Year, to, say 2010, I want the Starting Sale Year to return 2010 please.
@mrothschild how raw data look like? You need to share that to get the expected solution. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks @parry2k ,
usually I do, and just plain forgot to this time.
Here's a link to PBIX: https://drive.google.com/file/d/1j_4CrUj0fPh0xK6hnO7OZ-uIWkoP5Kdg/view?usp=sharing
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |