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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.