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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
tjgamble
Regular Visitor

DAX: custom numeric format preventing table filter from working, is this by design?

Hello, I'm looking to understand if the behaviour I'm seeing with the "format" command in DAX with respect to table visual filtering is expected and if so is there a workaround?  What I'm trying to do is use the format command to display a negative value in brackets and replace zeros with a "-", like so:

 

MeasureWithFormat = format(sum('Office Fact'[Count]),"#,###;(#,###);-")
 

This works until I apply a slicer/filter and the non-selected rows are not removed from the table or matrix visual control in the report.

 

Here is my full data set where we can see the formatting command working as expected.  No slicers have been applied at this point.  The value: "MeasureWithoutFormat" is just a simple SUM command:   MeasureWithoutFormat = sum('Office Fact'[Count])

 

Capture1.PNG

 

 

 

 

 

 

 

 

 

 

 

When I apply the slicer, rather than the non-selected rows being removed the formatted values just disappear leaving blank rows. The second table shows the effect of the slicer on the table using just the non-formatted measure, which behaves as expected.

 

Capture2.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Is this expected?  I was expecting that the format command would enable the table to be filtered as normal and the non-selected rows removed rather than the values just hidden.

 

Thanks in advance.

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi,

your measure MeasureWithFormat returns in every situation a string and this is never blank.

Use the properties settings inside the data model view. Select your measure and type your custom formatting as you would do in Excel:

 

picture.png

 

Regards Frank AT

View solution in original post

2 REPLIES 2
FrankAT
Community Champion
Community Champion

Hi,

your measure MeasureWithFormat returns in every situation a string and this is never blank.

Use the properties settings inside the data model view. Select your measure and type your custom formatting as you would do in Excel:

 

picture.png

 

Regards Frank AT

Thank you, that works fine.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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