Forum Discussion
Data formatting issue
- 9 months ago
Hello EmilieRuff
USE DAX for dynamic formatting
Formatted Value =
IF(
SELECTEDVALUE('Table'[Type]) = "Percentage",
FORMAT([Value], "0.00%"),
FORMAT([Value], "0.00")
)
If my response helped you, please consider clicking
Accept as Solution β and giving it a Like π β it helps others in the community too.
Thanks,
Connect with me on:
LinkedIn
Hi EmilieRuff
This is a common challenge when working with mixed data types percentages and decimal numbers in the same column. Power BI interprets the data format based on how the data is loaded and processed, which can cause issues when trying to filter or visualize them together. You can try with following approaches.
- One straightforward solution is to keep the data combined in the same column but create a new calculated column that standardizes the format.
- For example:you can add a new column in Power BI with a DAX expression that converts all values to decimals, whether they originally are percentages or decimals.
- Splitting the data into two separate columns one for percentages, one for regular decimal numbers is a good approach. You can do this in Excel before importing or within Power BI using Power Query by adding custom columns with conditional logic.
Also, while reorganization into a new tab might seem like the easiest solution, creating a calculated column or splitting data with Power Query gives you more flexibility and keeps your dataset cleaner and more manageable.
π I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
π‘ Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
π As a proud SuperUser and Microsoft Partner, weβre here to empower your data journey and the Power BI Community at large.
π Curious to explore more? [Discover here].
Letβs keep building smarter solutions together!