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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Add Sumif values from a different table based on slicer selection

Hi,

 

I would like to fulfil a column with a sumif of values from a different table but with a filter from a slicer.

 

Let’s give the example:

  • One table has a list of items with two columns (item number and Item description)

Nuno_Paixao_1-1664694638686.png

  • Other table has the consumption of items (item number, quantity and consumption date

Nuno_Paixao_3-1664695003217.png

My objective is, keeping the first list with all items and add one more column to fulfil with the consumption for respective item.

But the consumption must change for the respective year selected on slicer with the year.

 

For example, if 2021 is selected on slicer, the item, in the first table the item "a" will appear with the value 2 on column consumption, all the other items will keep with no valeu or zero value.

If 2022 was selected on slicer, the item, in the first table the item "a" will appear with the valeu 4 on column consumption and item "c" with 14, all the other items will keep with no valeu or zero value.

 

Many Thanks 

Nuno Paixão

1 ACCEPTED SOLUTION

@Anonymous 

Hi,

Right click the Item then tick show items with no data.

Dinesh_Suranga_0-1664708161758.png

Please accept this as solution if this helped to solve your problem.

Thank you

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi Dinesh,

 

many thanks, so simple.

 

KR 

Nuno Paixão

Dinesh_Suranga
Continued Contributor
Continued Contributor

@Anonymous 

First -  Create relationship between items table and consumption table base on Item.

Dinesh_Suranga_0-1664697630206.png

 

Then create a mesure using  following DAX formula.

Consumption = SUM(Consumptions[qtd])

Then you will get the answer.

Dinesh_Suranga_1-1664697901921.png

Dinesh_Suranga_2-1664697924435.png

Please post back here if you are having issues.

If this post helped to solve your issue. Please acept as the solution.

Thank you.

Anonymous
Not applicable

Hi Dinesh,

 

Thanks, but I need keep the other items in the list with zero values.

 

Many Thanks

Nuno Paixão

 

@Anonymous 

Hi,

Right click the Item then tick show items with no data.

Dinesh_Suranga_0-1664708161758.png

Please accept this as solution if this helped to solve your problem.

Thank you

 

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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