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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Gaston78
Frequent Visitor

Create table from slicer to search a dynamic column in other table

Hi eveone,
 
DAX formula below is correct :
Table test = CALCULATETABLE(
                            SUMMARIZE('Référentiel : contrats salariés',
                                                 'Référentiel : contrats salariés'[contrat Saphyr], 'Référentiel : contrats salariés'[Code Gaia],"Agent",
                                                 DISTINCT('Référentiel : contrats salariés'[Agent])
                                                  ),
                                                 FILTER('Référentiel : contrats salariés',
                                                            'Référentiel : contrats salariés'[Intégration TW_01/01/2022]="NON")
                                                 )
 
I would like that the choice of the column "'Référentiel : contrats salariés'[Intégration TW_01/01/2022]" to be dynamic from slicer which contains the date format "dd/mm/yyyy" but which refers to a specific column of another table.
The DAX formula above works but I am obliged to freeze the filter column " 'Référentiel : contrats salariés'[Intégration TW_01/01/2022]"
 
DAX formula below gives no results 😞
'Xcplt : libellés en-têtes rapport M-1'[Libellés des en-têtes] is data slicer
Table test = CALCULATETABLE(
                            SUMMARIZE('Référentiel : contrats salariés',
                                                 'Référentiel : contrats salariés'[contrat Saphyr], 'Référentiel : contrats salariés'[Code Gaia],"Agent",
                                                 DISTINCT('Référentiel : contrats salariés'[Agent])
                                                  ),
                                                 FILTER('Référentiel : contrats salariés',
                                                             VAR _Column =
                                                                    SWITCH(SELECTEDVALUE('Xcplt : libellés en-têtes rapport M-1'[Libellés des en-têtes])
                                                                           , "01/01/2022", 'Référentiel : contrats salariés'[Intégration TW_01/01/2022]
                                                                          , "01/02/2022", 'Référentiel : contrats salariés'[Intégration TW_01/02/2022]
                                                                          , "01/03/2022", 'Référentiel : contrats salariés'[Intégration TW_01/03/2022]
                                                                          ...)
                                                            RETURN
                                                                                                         _Column = "NON" )
                                                  )
 
The objective would be to obtain a list of employees according to the date selected in the slicer and which are not integrated (dynamic column according to date slicer).
 
Thanks for you help.
I wish you a nice day   🙂
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Gaston78 , You can not use slicer values in a calculated table.

 

Only a var table inside measure can get those values

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Gaston78 , You can not use slicer values in a calculated table.

 

Only a var table inside measure can get those values

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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