Forum Discussion

PowerBI_GER's avatar
PowerBI_GER
Frequent Visitor
6 years ago
Solved

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:
  • PowerBI_GER's avatar
    PowerBI_GER
    6 years ago

    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.

     

2 Replies

    • PowerBI_GER's avatar
      PowerBI_GER
      Frequent Visitor

      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.