cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper IV

## how to change format of a calculated measure after using format function

Hi,

I need help in following situation,

I have calculated bounce rate, below is my formula,

Bounce Rate for Direct = ROUNDDOWN([Bounce for Direct] / [Entrance for Direct]*100,2)

and this bounce rate is included into a dynamic calculated measure.Below is the dynamic measure,

Measure Selection for Direct = IF(ISCROSSFILTERED( 'Measure Dimension for Direct'[Measure] ),
SWITCH( TRUE(),
VALUES('Measure Dimension for Direct'[Measure] ) = "Bounce Rate", [Bounce Rate for Direct],
VALUES('Measure Dimension for Direct'[Measure] ) = "Exit Rate",[Exit Rate for Direct] ,
VALUES('Measure Dimension for Direct'[Measure] ) = "New visitor", [New Visitor for Direct],
VALUES('Measure Dimension for Direct'[Measure] ) = "Pageviews", [Pageviews for Direct],
VALUES('Measure Dimension for Direct'[Measure] ) = "Session", [Session for Direct],
VALUES('Measure Dimension for Direct'[Measure] ) = "Entrance", [Entrance for Direct],
BLANK()),BLANK() )

Now i want to show bounce rate with % sign when user will select bounce rate into the slicer.

so for that, I have written folowing dax formula,

Bounce Rate for Direct = FORMAT(ROUNDDOWN([Bounce for Direct] / [Entrance for Direct]*100,2),"%")

but, the problem is that, when i create any visualization with this measure it shows,

cannnot convert value"%" of type text to type numeric.

it seems that, format makes this measure into text type. Can i change this type from text to numeric ?

so that i can show bounce rate with % sign.

expected output:

suppose i  want to create a bar chart of page wise bounce rate, it should show bounce rate with % sign (such as, 16%,20% etc)

below is one screenshots,

i want to show the % sign of every data label.

will it be possible?

Any suggesation is really appreciable.

Thanks,

snandy

1 ACCEPTED SOLUTION
Frequent Visitor

Hello @snandy2011, Please do not multiply the function (Bounce Rate for Direct = ROUNDDOWN([Bounce for Direct] / [Entrance for Direct]*100,2)) by 100. This will generate values in points, now go to edit queries > select the column > change values to percentage.

If the column does not show up under edit query, then kindly use the "New Column" option to add the above function and refresh the table.

Do le me know if it works.

6 REPLIES 6
Frequent Visitor

Hello @snandy2011, Please do not multiply the function (Bounce Rate for Direct = ROUNDDOWN([Bounce for Direct] / [Entrance for Direct]*100,2)) by 100. This will generate values in points, now go to edit queries > select the column > change values to percentage.

If the column does not show up under edit query, then kindly use the "New Column" option to add the above function and refresh the table.

Do le me know if it works.

Helper IV

The approach was really awesome.But, in my case. It did not work.Because, bounce for Direct and Entrance for direct, both are another measure.Anyway, I have achieved it by another way..

Snandy
Frequent Visitor

Hello! How were you able to achieve it? I'm using the exact same code, but can't seem to format it properly.

Helper IV

Thanks for reply..ok.. Let me try.I will let you know

Community Support

Hi snandy2011,

You can simply click Modeling-> Format to change type with percentage.

Regards,

Jimmy Tao

Helper IV

Hi v-yuta-msft,

Thanks for reply..I did it..but no solution.. is there any another way?

Thanks,

snandy

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors