cancel
Showing results for 
Search instead for 
Did you mean: 

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

Reply
snandy2011
Helper IV
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,

Screenshot (70).png

 

 

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

 

will it be possible?

 

Any suggesation is really appreciable.

 

Thanks,

snandy

 

 

1 ACCEPTED SOLUTION
rudra_deep
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.

View solution in original post

6 REPLIES 6
rudra_deep
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.

 

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..
 
Thnaks once again for replying,
 
Snandy

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

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

v-yuta-msft
Community Support
Community Support

Hi snandy2011,

 

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

 

Regards,

Jimmy Tao

Hi v-yuta-msft,

 

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

 

Thanks,

snandy

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

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

Power BI Fabric Summit Carousel

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