cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Slicer and DAX Column not working

Hello,

I have a "Date" table and a "Cases" table that are not linked. 

 

I created the following DAX Column in my "Date" table to return the number of Cases reported to date (based on count of IDs) and it is working fine.

 

Column= CALCULATE ( DISTINCTCOUNT( 'Cases'[ID]), FILTER('Cases','Cases'[Reported On] <= 'Date'[Date] ))
 
If I add a filter for the Department as follows, it still works as expected:
 
Column = CALCULATE ( DISTINCTCOUNT( 'Cases'[ID]), FILTER('Cases','Cases'[Reported On] <= 'Date'[Date] && 
'Cases'[Department] = "Business Technology" ))
 

I am trying to replace the Department condition with a slicer that will allow me to select any available Department, but it is not working.

 

I tried the following with a slicer visual that cotains the 'Cases'[Department] field:

 

Column= CALCULATE ( DISTINCTCOUNT( 'Cases'[ID]), FILTER('Cases','Cases'[Reported On] <= 'Date'[Date] && 

'Cases'[Department] = SELECTEDVALUE('Cases'[Department]) ))  

 

I also tried creating a new "Department" table with all the possible values and adding is as a slicer with the following:

 

Column= CALCULATE ( DISTINCTCOUNT( 'Cases'[ID]), FILTER('Cases','Cases'[Reported On] <= 'Date'[Date] && 

'Cases'[Department] = SELECTEDVALUE('Department'[Department]) ))  
 
Any help would be appreciated.
 
Hugues.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper III
Helper III

Re: Slicer and DAX Column not working

4 REPLIES 4
Highlighted
Super User IV
Super User IV

Re: Slicer and DAX Column not working

Check if the interaction has been disabled

 

Interactions.png



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper III
Helper III

Re: Slicer and DAX Column not working

Good suggestion, but it is active 😞

Highlighted
Helper III
Helper III

Re: Slicer and DAX Column not working

Highlighted
Microsoft
Microsoft

Re: Slicer and DAX Column not working

Hi , @huguest 

Looks like my reply was a little late. But it's great to hear your problem got resolved!

It's true that it's better to use measure rather then calculate columns here.

I also make a demo here: pbix attached

 

Could you please tell me whether your problem has been solved?
If it is ,please kindly  accept your reply as solution to close this thread, that way, other community members will easily find the solution when they get the same issue.

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Kudoed Authors