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
Anonymous
Not applicable

how to make a value column to show decimal numbers and whole numbers at the same time

Hi experts,

 

I have 2 columns , one is [Categories], which includes "sales prices", "full costs", "variables costs" and  "Ranking". another is [value]  column with numbers. I want that in matrix visuals, the first three categories' numbers show two decimals, while "Rank" numbers have no decimals. is it possible to do it directly in desktop? Thanks in advance!

another way i think is to seperate the 4 categories into 4 columns in power query and set them with different data types.  

Yao2319_0-1688995283314.png

 

1 ACCEPTED SOLUTION
pankumar
Frequent Visitor

you can group table in pbi desktop as well.

View solution in original post

7 REPLIES 7
pankumar
Frequent Visitor

you can group table in pbi desktop as well.

iceparrot
Advocate II
Advocate II

@Anonymous yes, the method you mentioned. You can do it with the Power Query Editor in Power BI Desktop. 
Otherwise I don't know another method how to efficiently do it.

 

So in the Power Query Editor you would click: Transponse

iceparrot_0-1688999109920.png

Then your rows will be your columns. 

The next step would be to click the button Use First Row as Headers so that your new column names match your required ones. 

group your table in query editor then load your data to pbi desktop and change the value column data type to text and use matrix visual..

pankumar_0-1688999381568.png

pankumar_0-1689000090165.png

 

pankumar
Frequent Visitor

so you want to display 2 types of data (decimal and rounded) in single column in matrix visual, right ? if yes then group your table by category and sum of value and then you can change the data type to text for value column.

Anonymous
Not applicable

well, i think yes.  in the matrix visual I can make [category] as a column header, so 4 categories shown in 4 columns in the matrix visual. but in the table, there is only one value column and one category column. 

iceparrot
Advocate II
Advocate II

Hi @Anonymous , 

if you transform your table with each category row being a single column and the values being the rows then you can define the data format for each category column. 

Anonymous
Not applicable

Hi iceparrot, thanks for your reply!

so what you mean is the method i mentioned at the end of my post question right?

But i am wondering if there is any way to solve it in power bi desktop?

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.