Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone,
I created a SWITCH DAX measure that returns a mix of text and numeric values depending on conditions.
Example:
Result =
SWITCH(
TRUE(),
Table[Status] = "A", "Approved",
Table[Status] = "P", "Pending",
Table[Status] = "N", 1200,
Table[Status] = "X", 980,
BLANK()
)
The measure works, but Power BI treats the entire column as text, so numeric values appear left-aligned and behave like text.
I tried using FORMAT() and changing visual alignment, but I want a solution where numeric values appear right-aligned like numbers while still keeping text for other conditions.
Is there any way to:
Keep the mixed output from SWITCH, and
Make numeric values display as numeric (right-aligned) in the same column?
Any ideas or workarounds would be appreciated!
Solved! Go to Solution.
Not sure what is happening with your measure but when I create it, everything is right aligned. And the values stay either text or numeric
Phil
Proud to be a Super User!
Hi @Mahendra_k,
Thank you for reaching out to Microsoft Fabric Community.
Thank you @Ahmedx for the prompt response.
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa
Hi @Mahendra_k,
We wanted to kindly follow up to check if the solution provided by the user for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa
If you do this as a calculated column, it won't work. Power BI doesn't support two data types for columns.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 43 | |
| 41 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 186 | |
| 116 | |
| 95 | |
| 64 | |
| 45 |