cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Continued Contributor

## MATRIX formatting with mixed data types

For ease of explanation, this is a simplification of the problem I'm trying to solve, so hopefully the solution will expand to meet the final needs.

The data I'm pulling into PowerBI from Excel looks like this and that's how I'd like it to look in a PowerBI Matrix.

In that attempt, I created a Measure with the following code:

``````zzMarked_LRF_Text =

FORMAT(
IF(
ISFILTERED ( 'Fund I Investment Schedule'[Project] ) ,
VALUES ( 'Fund I Investment Schedule'[Marked LRF] ),
BLANK ()
),"0.00%")``````

But the output in the BI Matrix looks like this:

The PowerQuery data is pulling the Excel data as text (which is likely required).

How can I format the Matrix to show the data in 0.00% format?

Thanks!

1 ACCEPTED SOLUTION
Community Support

Hi, @mrothschild

According to your description, you want to know how can you format the Matrix to show the data in 0.00% format?

If I understand you correctly, then you can refer to my solution.

In your Measure, you might consider adding a judgment to convert data that can be converted to a percentage to a percentage.

You can refer to my Measure formula, I hope it helps you:

``````zzMarked_LRF_Text1 =
IF (
ISFILTERED ( 'Fund I Investment Schedule'[Project] ),
VAR value_ =
VALUES ( 'Fund I Investment Schedule'[Marked LRF] )
RETURN
IF (
ISERROR ( VALUE ( value_ ) ),
value_,
FORMAT ( VALUE ( value_ ), "0.00%" )
),
BLANK ()
)
``````

Here is my test result:

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,
Fen Ling,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 REPLIES 2
Community Support

Hi, @mrothschild

According to your description, you want to know how can you format the Matrix to show the data in 0.00% format?

If I understand you correctly, then you can refer to my solution.

In your Measure, you might consider adding a judgment to convert data that can be converted to a percentage to a percentage.

You can refer to my Measure formula, I hope it helps you:

``````zzMarked_LRF_Text1 =
IF (
ISFILTERED ( 'Fund I Investment Schedule'[Project] ),
VAR value_ =
VALUES ( 'Fund I Investment Schedule'[Marked LRF] )
RETURN
IF (
ISERROR ( VALUE ( value_ ) ),
value_,
FORMAT ( VALUE ( value_ ), "0.00%" )
),
BLANK ()
)
``````

Here is my test result:

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,
Fen Ling,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Continued Contributor

Thanks!  Works perfectly!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors