Forum Discussion
Calculated Measures as Rows and Columns in Matrix
- 5 years ago
Take a look at the Calculation Groups functionality. I belive it will accomlish what you are looking for. Here are some videos discussing the topic and showing how to create them:
https://www.youtube.com/watch?v=vlnx7QUVYME&ab_channel=GuyinaCubehttps://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/
Take a look at the Calculation Groups functionality. I belive it will accomlish what you are looking for. Here are some videos discussing the topic and showing how to create them:
https://www.youtube.com/watch?v=vlnx7QUVYME&ab_channel=GuyinaCube
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/
jdbuchanan71 this works great. But I am having one issue with it. When I want to look at MTD LY my calculation group does not calculate that properly. I seem to always get 1 of 2 outputs. It either gives me the Current MTD instead of LY. Or it will give me LY but for the entire month,.
Here is the measure I am using in my Calculation group to try to get MTD LY for a partial month, but this gives me just Current MTD
VAR _MTD = TOTALMTD( SELECTEDMEASURE(), Rolling_Calendar[Date] ) RETURN CALCULATE( _MTD, SAMEPERIODLASTYEAR(Rolling_Calendar[Date] ) )
Is there a way to calculate the parital MTD LY within calculation groups? I want to be able to see my Sales for October 2019 but only through October 19th.
Thanks for all the insight!
- jdbuchanan715 years agoSuper User
There are some tricks you can use to stop future dates from coming into PY calculations. Take a look at this article that goes through the steps of how to handle them.
https://www.sqlbi.com/articles/hiding-future-dates-for-calculations-in-dax/