Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX formula

sk2024_0-1722842515405.png

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 =
VAR LWK = CALCULATE(
    SUM(Append1[Demand]),
    Append1[WK] = "LWK",
    Append1[Month-Year] >= MIN('Append1'[Month-Year]),
    Append1[Month-Year] <= EDATE(MIN('Append1'[Month-Year]), 2))
VAR CWK = CALCULATE(
    SUM(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,
        SUM(Append1[Demand])
        )
    )
4 ACCEPTED SOLUTIONS
SachinNandanwar
Super User
Super User

Have you tried FORMAT function ?

FORMAT(YourValue, "0.0") & "%"


Regards,
Sachin
Check out my Blog

View solution in original post

Anonymous
Not applicable

Sorry but it is still showing same as above.

 

View solution in original post

Anonymous
Not 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.
 

View solution in original post

Great. Please mark my solution as solved.



Regards,
Sachin
Check out my Blog

View solution in original post

5 REPLIES 5
SachinNandanwar
Super User
Super User

Have you tried FORMAT function ?

FORMAT(YourValue, "0.0") & "%"


Regards,
Sachin
Check out my Blog
Anonymous
Not 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.
 

Great. Please mark my solution as solved.



Regards,
Sachin
Check out my Blog
bhanu_gautam
Super User
Super 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]))
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Anonymous
Not applicable

Sorry but it is still showing same as above.

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.