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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Basdo
Frequent Visitor

REMOVEFILTERS basically working, but not without underlying data

Hi everyone,

 

I've got a data model of this form:

 

ProductMonthSales
1May100 $
1June200 $
1July300 $
2May100 $
2July200 $

 

Now I want to calculate the total Sales ignoring the 'Month' column so I built a measure:


TotalSales = CALCULATE( SUM(Table[Sales]), REMOVEFILTERS(Table[Month]) )

 

I want this measure to be shown even for months without underlying data, e.g. Product 2 in June. But when I visualize the TotalSales measure over months the outcome looks like thise

 

ProductMayJuneJulyTotal
1600 $600 $600 $600 $
2300 $ 300 $300 $


How can the measure TotalSals = 300 $ be also shown for Product 2 in June?

 

Thanks in advance for all support.

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Thanks for the reply from @GuillaumePower , please allow me to provide another insight: 
Hi  @Basdo ,

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
DISTINCT('Table'[Product])

2. Connecting two tables.

vyangliumsft_0-1721203973020.png

3. Create measure.

Test =
var _table=
SUMMARIZE(ALL('Table'),[Product],"value",SUMX('Table',[Sales]))
return
SUMX(
    FILTER(
        _table,[Product]=MAX('Table 2'[Product])),[value])

4. Result:

vyangliumsft_1-1721203973028.png

 

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

SachinNandanwar
Super User
Super User

Its pretty easy.

Create a table using GENERATE

SachinNandanwar_0-1721299515141.png


Define relationship across this table and your original table based on ProductId

SachinNandanwar_1-1721299593707.png


And the use the generated table that I have named as MatrixTable in the Matrix visual

SachinNandanwar_2-1721299643997.png


Regards,

Sachin Nandanwar

 




 



Regards,
Sachin
Check out my Blog

View solution in original post

4 REPLIES 4
SachinNandanwar
Super User
Super User

Its pretty easy.

Create a table using GENERATE

SachinNandanwar_0-1721299515141.png


Define relationship across this table and your original table based on ProductId

SachinNandanwar_1-1721299593707.png


And the use the generated table that I have named as MatrixTable in the Matrix visual

SachinNandanwar_2-1721299643997.png


Regards,

Sachin Nandanwar

 




 



Regards,
Sachin
Check out my Blog
Anonymous
Not applicable

Thanks for the reply from @GuillaumePower , please allow me to provide another insight: 
Hi  @Basdo ,

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
DISTINCT('Table'[Product])

2. Connecting two tables.

vyangliumsft_0-1721203973020.png

3. Create measure.

Test =
var _table=
SUMMARIZE(ALL('Table'),[Product],"value",SUMX('Table',[Sales]))
return
SUMX(
    FILTER(
        _table,[Product]=MAX('Table 2'[Product])),[value])

4. Result:

vyangliumsft_1-1721203973028.png

 

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

GuillaumePower
Resolver I
Resolver I

Hi, I would say that you've to remove the filter on the Product like this :

TotalSales = CALCULATE(

SUM(Table[Sales]), REMOVEFILTERS(Table[Month]), REMOVEFILTERS(Table[Product] )) so you 'll make disappear the row filter on the  product.

Try to do that and say if it works  as you want.

 

Unfortunately this will only sum up over all Products and still keep the entry of Product 2 in June empty.
So the result looks like:

ProductMayJuneJulyTotal
1900 $900 $900 $900 $
2900 $BLANK900 $900 $

 

This is unfortunately not what I want. Any other ideas? 🙂

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.