The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have created MOM% DAX measure and used it in a table visual to see % change in sales. How can I make sure it only calculates when current month sales is present?
In my case I don't want to see MOM% April month in the table. How can I achieve that?
Solved! Go to Solution.
Hi,
Please try something like below whether it suits your requirement.
MoM% =
VAR __PREV_MONTH =
CALCULATE (
[Total Sales],
DATEADD ( 'WalmartSQL repository'[dtme].[Date], -1, MONTH )
)
RETURN
IF ( [Total Sales], DIVIDE ( [Total Sales] - __PREV_MONTH, __PREV_MONTH ) )
Hi,
Please try something like below whether it suits your requirement.
MoM% =
VAR __PREV_MONTH =
CALCULATE (
[Total Sales],
DATEADD ( 'WalmartSQL repository'[dtme].[Date], -1, MONTH )
)
RETURN
IF ( [Total Sales], DIVIDE ( [Total Sales] - __PREV_MONTH, __PREV_MONTH ) )