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
Anonymous
Not applicable

DAX values calculation confusion

Hi

I am a starter for power bi.
I were checking out a blog https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/

I really got confused how the values in calculation work!!! I am representing the same scenario provided in the blog. Someone please help me to understand.

VAR NumOfAllVisitsSameSalon =
CALCULATE (
[# Visits],
REMOVEFILTERS ( 'Visits' ),
VALUES ( 'Visits'[Beauty Salon] )
)

My understanding : The calculation is removing the filters in 'visits' table globally and values will take unique values from beauty salon column. So the count is 4 since there are 4 types of beauty salons. But when I pull this measure into the table already present in view it shows 3. Why?

Question 2:

CALCULATE(
[# Visits],
REMOVEFILTERS ( 'Visits'[Beauty Salon] ),
VALUES ( 'Visits'[Group] )
)

My understanding: There is only one filter(slicer) in the view. This same calculation as Remove filter with column name is showing different values for the table in view. But when I use this calculation as remove filter with table name it is showing a common value 5 for all the rows in table view. Why?

What makes difference for remove filter with column from table name even after having only one slicer in view?

Thanks in advance
1 REPLY 1
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

You can refer to the official document for checking the detailed usage:

https://docs.microsoft.com/en-us/dax/removefilters-function-dax 

 

Based on my test, the removefilter on a table similar to ALL function, 

001.PNG002.PNG

Slicer won't affect the results of removefilter:

003.PNG

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors