Forum Discussion
DAX formula
I want to remove "demand.00" from values section. I tried INT and ROUND function to solve but nothing worked. If I'm changing it to integer then "3M MDS % change" is also changing to integer, but it should be in %.
Total Demand =
Have you tried FORMAT function ?
FORMAT(YourValue, "0.0") & "%"- Anonymous2 years ago
Sorry but it is still showing same as above.
- Anonymous2 years ago
Yes, I tried.
IF(ISBLANK(MAX(Append1[Month-Year]))=FALSE(),IF(DISTINCTCOUNT(Append1[Month-Year])>1,FORMAT(Change, "0.00") & "%",FORMAT(SUM(Append1[Demand]), "")))
and it worked.
Thankyou so much. Great. Please mark my solution as solved.
5 Replies
- bhanu_gautamSuper User
Anonymous , Try updating measure as
Total Demand =
VAR LWK = CALCULATE(
SUMX(Append1, TRUNC(Append1[Demand])),
Append1[WK] = "LWK",
Append1[Month-Year] >= MIN('Append1'[Month-Year]),
Append1[Month-Year] <= EDATE(MIN('Append1'[Month-Year]), 2))
VAR CWK = CALCULATE(
SUMX(Append1, TRUNC(Append1[Demand])),
Append1[WK] = "CWK",
Append1[Month-Year] >= MIN('Append1'[Month-Year]),
Append1[Month-Year] <= EDATE(MIN('Append1'[Month-Year]), 2))
VAR Change = SWITCH(
TRUE(),
LWK = CWK, 0,
LWK = 0 && CWK <> 0, 100,
CWK = 0 && LWK <> 0, -100,
LWK <> 0, DIVIDE((LWK-CWK), LWK, 0) * 100 )
RETURN
IF(ISBLANK(MAX(Append1[Month-Year]))=FALSE(),
IF(DISTINCTCOUNT(Append1[Month-Year])>1,
Change,
SUMX(Append1, TRUNC(Append1[Demand]))
)
)- AnonymousNot applicable
Sorry but it is still showing same as above.
- SachinNandanwarImpactful Individual
Have you tried FORMAT function ?
FORMAT(YourValue, "0.0") & "%"- AnonymousNot applicable
Yes, I tried.
IF(ISBLANK(MAX(Append1[Month-Year]))=FALSE(),IF(DISTINCTCOUNT(Append1[Month-Year])>1,FORMAT(Change, "0.00") & "%",FORMAT(SUM(Append1[Demand]), "")))
and it worked.
Thankyou so much.- SachinNandanwarImpactful Individual
Great. Please mark my solution as solved.