Forum Discussion
Measures Power BI
Hi,
I'm totally new in Power BI world and I would like to create a measure which will calculate
a change between values for Jan-23 and values for next months.
So in this matix I would like to have for Jan - 1 (=46.9M/46.9M), Feb - 0.98 (=46.4/46.9), Mar - 0.96(=46.2M/46.9M) and so on...
How to deal with this problem?
8 Replies
- PijushRoy
Community Champion
Hi Aproksymacja
Can you please create measureMeasure = VAR _LastMonthSales = CALCULATE( Sum(Table[Sales]), PARALLELPERIOD( 'Calendar'[Transaction_Date], -1, MONTH ) ) RETURN % of Change Sale = DIVIDE( (Sum(Table[Sales])- _LastMonthSales), _LastMonthSales, BLANK() )
Let me know if that works for you
If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.
Thanks
Pijush
Linkedin- AproksymacjaNew Member
Thank you for your solution, however I would like to see all the time comparison to Jan23, sice this will be my baseline. Also when I applied this solution January 23 dissaapeard, and I would like to keep it as 1.00 everywhere.
- PijushRoy
Community Champion
Hi Aproksymacja
Can you please try in the above DAX, last line where BLANK(), please replace with 1Measure = VAR _LastMonthSales = CALCULATE( Sum(Table[Sales]), PARALLELPERIOD( 'Calendar'[Transaction_Date], -1, MONTH ) ) RETURN % of Change Sale = DIVIDE( (Sum(Table[Sales])- _LastMonthSales), _LastMonthSales, 1 )
Let me know
If your requirement is solved, please make THIS ANSWER as SOLUTION