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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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