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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Gianluca79
Frequent Visitor

how to pass slicer value in calculate table

Hi,

I have a fact table Fact_Scontrini to which a date time dimension and a customer dimension are connected.
STAR_SCHEMA.png

 

I want replicate this oracle statement whit use of a time slicer to select the minimum and maximum of a date, and pass the values ​​into a measure:

SELECT
MEM.K_MEMBER
FROM Dim_Member_Dormienti MEM
WHERE NOT EXIST
(
SELECT REC.K_MEMBER
FROM FACT_SCONTRINI REC
WHERE REC.K_MEMBER=MEM.K_MEMBER
AND REC.DataScontrino >= "DATA MIN SLICER"
)
and MEM.DATA_ADESIONE_MEMBRO <="DATA MAX SLICER"

 

The measure work fine:

_ClientiDormienti 3 Mesi =
VAR _UltimoScontrino= MAX(Dim_Data[DateKey])
VAR _ClientiDal = MIN (Dim_Data[DateKey])
VAR _ScontriniEsistenti = CALCULATETABLE(VALUES(Fact_Scontrini[K_Member]);Dim_Data[DateKey]>=_UltimoScontrino)  
VAR _ClientiAderentiDall =
CALCULATETABLE(
    VALUES(Dim_Member_Dormienti[K_MEMBER]);Dim_Data[DateKey]<=_ClientiDal)  

VAR _RESULT =EXCEPT(_ClientiAderentiDall;_ScontriniEsistenti)  
RETURN
COUNTROWS(_RESULT)

 

 

The count works correctly, but what if I also want to create a detail table of the k_members and not just the count?
In the table doesn't work correctly the value of slicer.

 

Please Help me.

 

Regards

Gianluca 

2 REPLIES 2
Gianluca79
Frequent Visitor

@Mahesh0016 but what is in the link is not for me. I'm supposed to filter a table that I'm supposed to build dynamically and I can't pass slicer filters in the formula

Mahesh0016
Super User
Super User

@Gianluca79 Refer below link if its not helps you , please share ENDOUT in table.
Fields parameters in Power BI - SQLBI

 

@Gianluca79 THANK YOU!!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors