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
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
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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