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
danjswade
Frequent Visitor

CALCULATE/FILTER measure Gives a different result to table and filter

Hi

 

I have two tables: 1 is an activity table and 1 is a history table. They are linked by unique GUIDs. If I display a visual and sum a column from the activity table and apply a filter, I get the correct data (i.e. returns 3 entries). If I use the following measure, it returns only 2 (essentially ignores one fo them):

 

calculate(
            sum(BI_Fact_Activity[VacancyAddedCount]),
            filter(
                BI_Vacancy,
                BI_Vacancy[eDate] = DATE(2222,02,22)
            )
)
 
Ultimately, I want to sum the AddCount column where the relevant GUID link the BI_Vacancy table has an eDate of 22/02/2222.
1 ACCEPTED SOLUTION
danjswade
Frequent Visitor

I'd respond in case anyone encounters the same issue. I fixed it by wrapping the filter table in ALL(), can only assume SOMETHING was impacting on the data being filtered, but this did the trick:

 

calculate(
            sum(BI_Fact_Activity[VacancyAddedCount]),
            filter(
                ALL(BI_Vacancy),
                BI_Vacancy[eDate] = DATE(2222,02,22)
            )
)

 

View solution in original post

5 REPLIES 5
danjswade
Frequent Visitor

I'd respond in case anyone encounters the same issue. I fixed it by wrapping the filter table in ALL(), can only assume SOMETHING was impacting on the data being filtered, but this did the trick:

 

calculate(
            sum(BI_Fact_Activity[VacancyAddedCount]),
            filter(
                ALL(BI_Vacancy),
                BI_Vacancy[eDate] = DATE(2222,02,22)
            )
)

 

Daniel29195
Super User
Super User

@danjswade 

not sure if i understand what you want to achieve,but 

assuming bi_vacancy is linked to bi_fact_activity with a 1-many relationship going towards the bi_fact_activity, 

 

calculate(
            sum(BI_Fact_Activity[VacancyAddedCount]),
                BI_Vacancy[eDate] = DATE(2222,02,22))
 
 
 
this should work i guess. 
 
if not, please share more info about the issue . 
 
best regards..
 
 
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
 
 

Thanks for the reply.

 

Unfortunately, that didn't work. Simply returned a blank

 

What further information would you need?

Hi,

Share the download link of the PBI file and show the expected result very clearly.


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

HI @danjswade,

You can try to use following measure if it suitable for your requirement:

formula =
CALCULATE (
    SUM ( BI_Fact_Activity[VacancyAddedCount] ),
    FILTER ( ALLSELECTED ( BI_Vacancy ), BI_Vacancy[eDate] = DATE ( 2222, 02, 22 ) )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.