Forum Discussion
Measures Power BI
Hi Aproksymacja
Can you please try in the above DAX, last line where BLANK(), please replace with 1
Measure =
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
It helped for January, it is visible now, but calculations are not proper
In your solution 0.977(Jun) = Jun/May
I would like to have 0.94 (Jun) which is 164498412(Jun)/174792138(Jan)
- PijushRoy2 years ago
Community Champion
Hi Aproksymacja
Try thisMeasure = VAR _LastMonthSales = CALCULATE( Sum(Table[Sales]), PARALLELPERIOD( 'Calendar'[Transaction_Date], -1, MONTH ) ) RETURN % of Change Sale = If(ISBLANK(_LastMonthSales) || _LastMonthSales =0, 1, DIVIDE( (Sum(Table[Sales])- _LastMonthSales), _LastMonthSales, BLANK() )f your requirement is solved, please make THIS ANSWER as SOLUTION
- Aproksymacja2 years agoNew Member
Unfortunatelly now I have 1 everywhere.
- PijushRoy2 years ago
Community Champion
Aproksymacja
Please create a pbix that contains sample data but still reflects your semantic model (tables, relationships, calculated columns, and measures). Upload the pbix to OneDrive, Google Drive, or dropbox and share the link in this thread. If you are using a spreadsheet to create/import the sample data instead of the manual import method, share the spreadsheet as well.
OR share sample data in excel format