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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
HugoMachado
Regular Visitor

Do not show the values when 3 conditions are meet

Hello!

 

I want to do the following transformation table:

 

HugoMachado_0-1723194250753.png

Where when the document number is the same, the categoy 1 and category 2 are the same, and the sum of all the value is zero, the data must be deleted or not shown.

If document number is the same, the categoy 1 and category 2 are the same, and the sum of all the value is not zero, must calcule the sum and display the value. 

 

How can I do it?

 

Thanks in advance

1 ACCEPTED SOLUTION

Hi, and now as you are showing the 11doc_number is present on the table. And is failing the first requirement.

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, select the first 3 columns, right click and select Group.  Select SUM and Value.  Filter the last column on >0.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new calculated table.

 

Jihwan_Kim_0-1723195137673.png

 

 

new table expected result = 
	FILTER(
		SUMMARIZECOLUMNS(
			data[doc_number],
			data[category_1],
			data[category_2],
			"@valuetotal", SUM(data[value])
		),
		[@valuetotal] <> 0
	)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Thanks @Jihwan_Kim  for your quick reply. And I have an additional, question, the original table has other columns (such as date), so how can I have the other columns in the new table?

Hi,

In my opinion, you can add other columns from the same table.

Please try it in your sample pbix file.

Thanks.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

@Jihwan_Kim 

What I pretended was something like this:

HugoMachado_0-1723216673892.png

 

And I do not know how to add the date column.

Jihwan_Kim_0-1723266204302.png

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Hi, and now as you are showing the 11doc_number is present on the table. And is failing the first requirement.

Jihwan_Kim_0-1723519363868.png

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.