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
SR1
Helper I
Helper I

Measure not in sync with slicers

Hi,

 

I have created a measure that counts the number of rows based on Date & Name column.

However the measure is not getting changed according to the slicer selection. Please help me find the issue.

 

Here is my code:  

CountVal = CALCULATE ( COUNTROWS (Sample), ALLEXCEPT (Sample,Sample[Date], Sample[Name] ) ) 

 

Sample table:

Capture.JPG

 

 

I am using date dimension for the date slicer.

 

Thanks!

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Also:

 

CountVal1 = CALCULATE ( COUNTROWS ('Sample'), ALLEXCEPT ('Sample','Calendar'[Date], 'Sample'[Name] ) ) 

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

7 REPLIES 7
Greg_Deckler
Super User
Super User

Also:

 

CountVal1 = CALCULATE ( COUNTROWS ('Sample'), ALLEXCEPT ('Sample','Calendar'[Date], 'Sample'[Name] ) ) 

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

Dumb question, is your Date dimension related to your fact table?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Yes. Other measures created on this fact table are in sync with the slicers.

 

 

Right, see my second response, you need to ALLEXCEPT your date dimension, not your fact table for the date at least.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Tried but still facing the same issue.

Hmm, mine seems to work like a champ. See attached.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thank you so much! It works now! I was using DateId column instead of Date column in my measure. But my slicer was using date column. 

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.