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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

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
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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