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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JustinDoh1
Post Prodigy
Post Prodigy

Simple question on DAX

I have following DAX that I have been using but I was wondering about this for a long time.

 

DAX =
IF( HASONEVALUE( tblTest[Name]),

         var CurrentTestValue = SELECTEDVALUE( tblTest[Field])

    return
          CALCULATE(
                    SELECTEDVALUE( tblMain[Rating]),
                    TOPN(1,
                             FILTER(
                                    ALL( tblMain ),
                                    CurrentTestValue <= tblMain[CutOff]
                             ),
                            tblMain[MaxTotal],
                            ASC
                        ),
                       All(tblMain)
              )
)

 

My question is:

1) What is point of All(tblMain)? I know that it would not make a difference if that part is there or not.

1 ACCEPTED SOLUTION
pallavi_r
Super User
Super User

Hi @JustinDoh1 

 

Yes it is very much required to ignore all the external filters. It makes sure the comparison is on the entire set of data in the table ignoring the filters if any report, page, slicers or selection.

 

If this post helps, please accept this as a solution. Appreciate your kudos.

Thanks,
Pallavi

View solution in original post

3 REPLIES 3
pallavi_r
Super User
Super User

Hi @JustinDoh1 

 

Yes it is very much required to ignore all the external filters. It makes sure the comparison is on the entire set of data in the table ignoring the filters if any report, page, slicers or selection.

 

If this post helps, please accept this as a solution. Appreciate your kudos.

Thanks,
Pallavi

@pallavi_r  So, it is not required, correct?

Hi @JustinDoh1 , It is required.

Thanks,

  • Pallavi

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.