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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AlB
Super User
Super User

Is this the normal behavior? - Puzzled by result

Hi all,

 

I have a simple scenario (see pbix here😞  

1. Tables:

     a. A one-column CalendarTable with the first ten days of 2015

     b. A SalesTable with two columns:

            [Date]   --> Same first ten days of 2015

            [Amount] 

2. Matrix visual:

     a. SalesTable[Date] in rows

     b. CalendarTable[Date] in a slicer

     c. In values:

         c1. Sales[Amount]

         c2.  SalesMeasure = CALCULATE(SUM(SalesTable[Amount]), ALL(CalendarTable[Date]) )

         c3.  SalesMeasure2 = CALCULATE(SUM(SalesTable[Amount]), ALL(SalesTable[Date]) )  

 

 Now, I would expect both measures, [SalesMeasure]  and [SalesMeasure2], to yield the same results in every row of the matrix, i.e the sum of all rows in SalesTable[Amount]. This is not the case. It appears that the slicer still has an effect on [SalesMeasure2]. I do not understand why this is so. Since we are using ALL(SalesTable[Date]) I would expect filters to be removed. The slicer is active and it propagates down to SalesTable, but that should be neutralized by the ALL(SalesTable[Date]) anyway... 

 

Can anybody explain this result? Is this the normal behavior? 

 

Many thanks  

1 ACCEPTED SOLUTION

Hi @AlB,

 

on the expanded version of the SalesTable (which includes the Calendar Table as you've mentioned) now you have two columns 'Date', the native one of 'Sales' plus the one coming from 'Calendar'.

Therefore on the measure:

 

CALCULATE(SUM(SalesTable[Amount]), ALL(SalesTable[Date]) )  

 

the filter coming from the Slicer (on which you 're using Calendar[Date]) remains active because you're removing the filter only from the 'Date' column that is native to Sales

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

4 REPLIES 4
LivioLanzo
Solution Sage
Solution Sage

Hi @AIB this has to do with the concept of expanded tables with which the table on the many side 'inherits' the columns from the one side. You are removing the filter on the column Sales[Date] but the filter on the column Calendar[Date] is still active, so you need to remove that filter as well in your measure.

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Hi @LivioLanzo

Thanks very much for your prompt response. I do not quite agree with what you say but it certainly put me in the right direction. Here's what I think is happening. Let me know what your take is:

 

I was using ALL(SalesTable[Amount]). With this we're removing the filters on that column but the other column in SalesTable, SalesTable[Amount] will still be crossfiltered by the slicer. To prevent this, we need to do the ALL( ) on the whole SalesTable. This measure works with the slicer on CalendarTable[Date] still active:

 

 

SalesMeasure3 = CALCULATE ( SUM ( SalesTable[Amount] ); ALL ( SalesTable ) )

 

I do not think expanded tables play a role here since the expanded table of SalesTable includes CalendarTable but the expanded table of CalendarTable does not include SalesTable.  

 

What do you reckon?  

 

Hi @AlB,

 

on the expanded version of the SalesTable (which includes the Calendar Table as you've mentioned) now you have two columns 'Date', the native one of 'Sales' plus the one coming from 'Calendar'.

Therefore on the measure:

 

CALCULATE(SUM(SalesTable[Amount]), ALL(SalesTable[Date]) )  

 

the filter coming from the Slicer (on which you 're using Calendar[Date]) remains active because you're removing the filter only from the 'Date' column that is native to Sales

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

@LivioLanzo

I see what you mean. You're right. I'll mark the post as solution when the feature works again.

Thanks   

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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