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
yforti13
Regular Visitor

Help topn function

Good afternoon!

I am having a problem with the display of my topn formula.


In the first photo the measurement being used is this:

top10 =
CALCULATE(
    [m_CNE180],
    FILTER(
        VALUES(d_DemaisConvenios[Convênio]),
        [m_TopCNE180Gruposaaa] <=10))

Result:
yforti13_1-1744230302911.png


In the second photo the measurement being used is this:

m_Top10v2 =

var x =CALCULATE(
    [m_CNE180],
    FILTER(
        VALUES(d_DemaisConvenios[Convênio]),
        [m_TopCNE180Gruposaaa] <=10
        && NOT(ISBLANK([m_CNE180]))))

RETURN
SWITCH(
    TRUE(),
    NOT ISINSCOPE( d_DemaisConvenios[Convênio] ) && NOT ISINSCOPE( d_Grupos[Value] ),
    [m_CNE180],

    NOT ISINSCOPE( d_DemaisConvenios[Convênio] ) && SELECTEDVALUE( d_Grupos[Value] ) = "3. Demais Convênios",
    [m_CNE180],

    SELECTEDVALUE( d_Grupos[Value] ) = "1. Top 10",
    x

Result:

yforti13_3-1744230417350.png

For some reason that I don't know, in the second formula it shows me this line marked in yellow, which had no data for the current month (February)

Does anyone know how to solve this? If there was no data for the current month, it shouldn't show the information


 





 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You have multiple dates. The TOP10 will be different for each date, and that is not something you can show in a table visual like that.  If you calculate the Top 10 across all selected dates then your result is likely correct.

View solution in original post

4 REPLIES 4
v-echaithra
Community Support
Community Support

Hi @yforti13 ,

We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @yforti13 ,

We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @yforti13 ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

lbendlin
Super User
Super User

You have multiple dates. The TOP10 will be different for each date, and that is not something you can show in a table visual like that.  If you calculate the Top 10 across all selected dates then your result is likely correct.

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