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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to display blank instead of repeated values

Hello, 

 

I have two tables: table sales with measure amount and table product: product name - > product subcategory 

 

I have a problem to display values of amount with granularity of product. The amount in table sales is with product name and not product subcategory, so the value will be repeated, how to display blank instead?

 

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

According to your description, I create this data:

2020.12.173.png

2020.12.174.png

Here are the steps you can follow:

1. Create measure calculates the amount of product name to display the duplicate value.

 

Measure =
CALCULATE(SUM(Sales[amount]),FILTER('Sales','Sales'[ product name]=MAX('Sales'[ product name])))

 

2020.12.171.png

2. Create measure changes the duplicate value into a blank value.

 

Measure 2 =
IF(HASONEFILTER('Product'[product subcategory]),BLANK(),SUM(Sales[amount]))

 

3. Result.

2020.12.172.png

You can downloaded PBIX file from here.

 

If my answer is not what you need, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Best Regards,

Liu Yang

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

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

According to your description, I create this data:

2020.12.173.png

2020.12.174.png

Here are the steps you can follow:

1. Create measure calculates the amount of product name to display the duplicate value.

 

Measure =
CALCULATE(SUM(Sales[amount]),FILTER('Sales','Sales'[ product name]=MAX('Sales'[ product name])))

 

2020.12.171.png

2. Create measure changes the duplicate value into a blank value.

 

Measure 2 =
IF(HASONEFILTER('Product'[product subcategory]),BLANK(),SUM(Sales[amount]))

 

3. Result.

2020.12.172.png

You can downloaded PBIX file from here.

 

If my answer is not what you need, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you! This worked for a similar issue although I was trying to view data in a Matrix Table that didnt have a proper relationship available between the underlying tables.  This workaround allowed for me to view detailed data from one table without duplicating measures created on another table. 

d_gosbell
Super User
Super User


@Anonymous wrote:

The amount in table sales is with product name and not product subcategory, so the value will be repeated, how to display blank instead?

 


This does not sound right, the value should not be repeating. Can you post a screenshot of how you have your relationships configured. It sounds like you are either missing a relationship or it's inactive or filtering in the wrong direction.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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