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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Loic_Pedro_Hans
Regular Visitor

Problem with generate Table with TopN

Hi,

 

I create a Slicer  :

Number_Customer =
    SELECTCOLUMNS(
        {
            (1),
            (2),
            (3),
            (5),
            (10),
            (20),
            (30)
        },
        "MyNumber",[Value]
    )
Loic_Pedro_Hans_0-1732089971017.png

When I want to generate a table with the slicer from selection, the number of clients is always 10, even I modify the slicer. the Dax to create the  table is : 

 

Top Retard =
VAR Nb_Clients =
    IF(
    HASONEVALUE( Number_Customer[MyNumber] ),
    VALUES (Number_Customer[MyNumber]),
    10
)
RETURN
    TOPN(Nb_Clients,'Max Retard Client','Max Retard Client'[Max Retard],ASC)
 
Thanks for your help !
 
1 ACCEPTED SOLUTION
Loic_Pedro_Hans
Regular Visitor

2 REPLIES 2
Loic_Pedro_Hans
Regular Visitor

Thank's a lot.

johnt75
Super User
Super User

Calculated tables are only calculated during data refresh, they cannot react to slicers or filters. If you need something to dynamically react to slicers you have to use a measure.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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