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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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