Forum Discussion
Add "%" to Calculation items in Calculation groups.
- 4 years ago
Hi Anonymous
Change the measure format:
1 - you can add format to the DAX code:VAR CY = SELECTEDMEASURE () VAR PY = CALCULATE ( SELECTEDMEASURE (), SAMEPERIODLASTYEAR ( 'Calendar'[Date] ) ) VAR YOY = CY - PY RETURN FORMAT ( DIVIDE ( YOY, PY ), "Percent" )2 - Change the Measure format:
VAR CY = SELECTEDMEASURE () VAR PY = CALCULATE ( SELECTEDMEASURE (), SAMEPERIODLASTYEAR ( 'Calendar'[Date] ) ) VAR YOY = CY - PY RETURN DIVIDE ( YOY, PY )If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Anonymous and I more thing I will not use FORMAT function to change it to percent, it will make your measure a text and you will not be able to visualize that measure in charts. FYI
✨ Follow us on LinkedIn and to our YouTube channel
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.