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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
t-atgeor
Microsoft Employee
Microsoft Employee

Format on Row, but not columns

Hi, is there a way to format the data type into different number formatting, based on row, but not columns?

 

I am having 3 different rows: Total Revenue, Total Cost, and Products (in units), and I would like to  have only the first two in Currency formatting, while the last one into decimal number (no special format).

 

How do i do so?

 

Thanks, Atanas

1 ACCEPTED SOLUTION

Hi t-atgeor,

 

As shared by Eno1978 and smoupre, data type in Power BI is column based, changing it by rows is not supported.

We could write measure to calculate the data and then format it to the wanted data type.

An idea about data type in measure, check:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15231165-conditional-formatted-me...

 

From your data example, would it be available to have the Total cost, Total Revenue and Product Amount as column, then add another date column to identify the values. In this way it would be available to format the data.

Date

Total Cost

Total Revenue

Product(Units)

2012/01/01

$10.00

$20.00

3000

2012/02/01

$5.00

$8.00

1000

2012/03/01

$15.00

$12.00

3000

 

Then regarding the difference and the percentage of difference, we could write measure or a calculated column to calculate.

 

What smoupre did here could be done under Query Editor, when your data is loaded, click Edit Queries, this opens Query Editor, under Transform tab, there are Transponse and Use first row as headers, when done those, on the Home tab, click Advanced Editor, you would find the code which should be similar with what smoupre posted:

1.PNG

 

Regards

View solution in original post

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

Not that I am aware of a way to do that. Maybe consider pivoting/unpivoting your data.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Seth_C_Bauer
Community Champion
Community Champion

@t-atgeor What do you have as column names? It almost sounds like you want to pivot the data to make those your columns... You can't have a different data type per row, it is all column based.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Hi @Seth_C_Bauer,

 

thanks for responding. What I would like to do is the following ( please see picture below). I would like to have the Cost and Revenue in USD, while keeping the products sold as units (but NOT dollars). Currently, I can change the format of the whole column, while am looking only for the two rows change.

 

Is it possible to have this done?

 

exa.PNG

 

Regards, Atanas

Perhaps something like this:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCskvScxRcM4vLlHSUTI00DMwANKmKJShgYGqUqwOTG1QallqXmkqUMIIqtwCqs4ISptC1QcU5ZemJJcoaJTmZZYUawKljA1gJhqA9cMooPpYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, #"Current Month" = _t, #"Previous Month" = _t, Difference = _t, #"Difference %" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Current Month", Int64.Type}, {"Previous Month", Int64.Type}, {"Difference", Int64.Type}, {"Difference %", type text}}),
    #"Transposed Table" = Table.Transpose(#"Changed Type"),
    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table")
in
    #"Promoted Headers"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler,

 

could you please explain to me how I should activate this function. Am not fully aware where to paste it?

 

Thanks, Atanas

Hi t-atgeor,

 

As shared by Eno1978 and smoupre, data type in Power BI is column based, changing it by rows is not supported.

We could write measure to calculate the data and then format it to the wanted data type.

An idea about data type in measure, check:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15231165-conditional-formatted-me...

 

From your data example, would it be available to have the Total cost, Total Revenue and Product Amount as column, then add another date column to identify the values. In this way it would be available to format the data.

Date

Total Cost

Total Revenue

Product(Units)

2012/01/01

$10.00

$20.00

3000

2012/02/01

$5.00

$8.00

1000

2012/03/01

$15.00

$12.00

3000

 

Then regarding the difference and the percentage of difference, we could write measure or a calculated column to calculate.

 

What smoupre did here could be done under Query Editor, when your data is loaded, click Edit Queries, this opens Query Editor, under Transform tab, there are Transponse and Use first row as headers, when done those, on the Home tab, click Advanced Editor, you would find the code which should be similar with what smoupre posted:

1.PNG

 

Regards

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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