Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Cobra77
Post Patron
Post Patron

change the format of a measure based on a dimension value

Hi,

 

it is possible to change the format of a measure based on a dimension value

Sample with a dimension Type budget and a measure Budget :

Typebudget        Budget

CA                         125000

Marge                    30000

Rate                        15%

 

CA and Marge whole number, and Rate its percentage.

 

Thanks

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Cobra77,

 

No. It is not possible to format the values under the same column with multiple data types. Otherwise, the data type of this column will be converted into Text.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-yulgu-msft
Employee
Employee

Hi @Cobra77,

 

No. It is not possible to format the values under the same column with multiple data types. Otherwise, the data type of this column will be converted into Text.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BobBI
Resolver III
Resolver III

 

try this and play around to make it work for you. I added a column

 

Column = if(Table1[Typebudget]="Rate",FORMAT(Table1[budget]/100,"Percent"),format(Table1[budget],"General Number"))

you might have to use /100 to show 15% instread.

 

data type.JPG

Thanks

SS

PBI is live on SSAS Tabular.

 

When i add column ( its ok , but i ve 21 column like this ;-(  )

but the format is Text ?

def_mesure.jpg

 

And in the matrice of PBI desktop , i have only 1 , in this sample Budget its a mesure, and F_1 your column :

Rate here = 0 , but in reality 0,13 , want 13%

 

def_mesure2.jpg

 

Thanks for your help

 

 

 

hi @BobBI

 

I add measure like  CBT_1_Test:=IF (HASONEVALUE('53 - CBT'[F_1]); VALUES('53 - CBT'[F_1]); BLANK())

its ok .

 

But how Sum if i ve multiple Affair ?

 

 

 

thanks

 

Hi ,

 

sorry , couldn't quite catch that , what output are you expecting ?

hi @BobBI

 

its the good result , 

def_mesure3.jpg

 

but how show thousand separator ?

and how sum or average if i have multiples lines ?

 

Thanks

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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