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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PowerBI_GER
Frequent Visitor

Dynamic DAX-Cal based on visual filter

Hello, i got a table with a lot of projects and activity dates. Therefore, i've created a DAX Calendar. My Problem: If i select a specific Project the filter does not fit my selection. I tried

 

dDAX-Cal =
VAR cMIN = CALCULATE(MIN('Table'[Date]), ALLSELECTED('Table'[Project]))
VAR cMAX = CALCULATE(MAX('Table'[Date]), ALLSELECTED('Table'[Project]))
RETURN
CALENDAR(cMIN,cMAX)
 
but it's always calculating the total MIN and total MAX, ignoring my selection regarding the project.
 
Link to my example file:
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@PowerBI_GER , You can not supply slicer value to the table(Table creation). The table will be static

View solution in original post

HA! I knew it! Just wasn't sure due to some other Threads.

 

Thanks for your help! This way i kept searching and found a solution:

I set the filtering to 'Both' in my data model. Therefore, only the selected values are shown in the slicer.

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@PowerBI_GER , You can not supply slicer value to the table(Table creation). The table will be static

HA! I knew it! Just wasn't sure due to some other Threads.

 

Thanks for your help! This way i kept searching and found a solution:

I set the filtering to 'Both' in my data model. Therefore, only the selected values are shown in the slicer.

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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