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
LukeChung
Frequent Visitor

For a Matrix, how do I apply Numeric Format with commas on a Count?

For a matrix, I have the Rows and Columns fields, with a Count of a field as the Values.

I can't seem to apply a numeric format on the grid for the values in thousands to be displayed with commas. Where is this set?

By selecting the Matrix, there doesn't seem to be a way to get the Format ribbon to show the numeric format section. No matter what I select on the Visualization Panel, it doesn't appear. I was expecting it would be on the Field Formatting section, but it doesn't appear.

I tried to apply the format by clicking on the matrix, then the Fields pane on the right and selecting the numeric field I'm counting on, but that doesn't make a difference. Nor should it since the formatting should be on the Count, and not the original field.

Any suggestions? We have an older matrix that shows its thousands with commas but I can't figure out how it was customized. Thanks.

1 ACCEPTED SOLUTION

Because I don't know your data you'll need to change the below example as required.

After you right click on your table and select 'New Measure'

KNP_0-1642565721149.png

 

Enter your mesure...

KNP_1-1642565789311.png

 

 

MyCount = COUNT(MyTable[MyColumn])

 

 

Replace MyCount with whatever you want your measure to be called. Replace MyTable and MyColumn with your table and any column but ideally something that doesn't have blanks or nulls. So yes, as you mentioned, something like a primary key would be ideal.

 

Once you've formatted as you want it and drop it in your visual, no further aggregation is specified. That is implicitly handled by whatever level your visual is grouping to.

 

 

Power BI Desktop has two options when downloading...

KNP_2-1642566453505.png

There are not a lot of differences, not sure why they both exist. Maybe because some companies disable the MS Store through group policies to prevent other downloads. 

If you download the version from the store, you don't have to worry about updating. Some people prefer to choose when they update. Either is fine.

 

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

8 REPLIES 8
LukeChung
Frequent Visitor

Thank you for your suggestion. Do I need to create a Measure first? I just dropped the field into the Matrix's Values box and use the Count option in the drop down. Does that not allow numeric formatting?

 

If I create a Measure for the original source, do I need to aggregate there? Currently, the matrix is doing the calculation so the underlying data relationships persist. Clicking on any cell in the matrix automatically filters the other panels.

 

FYI, I'm using the Power BI Windows Desktop version. 2.86.902.0 64-bit October 2020. Do I need to upgrade and if so how? I assumed it would upgrade itself.

I don't think you can format a field dropped in like that for counting.

Yes, create the measure and drop that in the matrix in place of the field. No additional aggregation should be required if the data model has appropriate relationships.

 

If you use the Microsoft Store version, it is self updating, the other version needs to be done manually. What I've suggested doesn't require you to update.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
LukeChung
Frequent Visitor

So what kind of measure do I create? NewField=1 (or any number), then format that, and drop that in the UI for it to count? Or sum?

Or does the Measure need to be a Count of the PrimayKey (so it becomes a 1), formatted with commas, then inserted into the UI using a sum?

 

Not clear what I'm trying to create with the Measure. Is it just a value like 1 or do I need to reference an existing field?

 

What does the Microsoft store version mean? Is the Windows Desktop not a Microsoft store product? Should I be using another version of Power BI?

Because I don't know your data you'll need to change the below example as required.

After you right click on your table and select 'New Measure'

KNP_0-1642565721149.png

 

Enter your mesure...

KNP_1-1642565789311.png

 

 

MyCount = COUNT(MyTable[MyColumn])

 

 

Replace MyCount with whatever you want your measure to be called. Replace MyTable and MyColumn with your table and any column but ideally something that doesn't have blanks or nulls. So yes, as you mentioned, something like a primary key would be ideal.

 

Once you've formatted as you want it and drop it in your visual, no further aggregation is specified. That is implicitly handled by whatever level your visual is grouping to.

 

 

Power BI Desktop has two options when downloading...

KNP_2-1642566453505.png

There are not a lot of differences, not sure why they both exist. Maybe because some companies disable the MS Store through group policies to prevent other downloads. 

If you download the version from the store, you don't have to worry about updating. Some people prefer to choose when they update. Either is fine.

 

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
LukeChung
Frequent Visitor

Thanks! That worked.

A very unintuitive way to set numeric formatting which should be on the grid, not a separate copy of a field for every different uses. It is what it is, so thanks for explaining it. I doubt I would have figured this out on my own.

Glad I could help.

Just as an aside, if you were doing anything else other than a count, on a numeric column, e.g. sum or average, PBI will respect the formatting you have set for that column.

The thing with the count is, it doesn't necessarily have a base format to work with, you could be counting text strings or numbers etc.

 

Generally, creating measures is the best way for everything, and would be required if you ever wanted to consume the PBI dataset in excel.

 

Column formatting is typically set here...

KNP_0-1642573594640.png

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
KNP
Super User
Super User

Hi @LukeChung,

 

I'm not sure you can format a field that you are counting like that.

Easiest way is to create a measure and use that instead. 

 

MyCount = COUNT(MyTable[MyColumn])

 

That way, you'll get the normal formatting options for the measure.

KNP_0-1642541121048.png

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
lbendlin
Super User
Super User

Needs more details - are you using the old style pane or the new preview of the properties pane?  Options have moved around a lot.

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.