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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
stephank
Frequent Visitor

DAX field scoping

The problem is that under 'ProjectMart' Table I can select only previously defined measure and not other colums i.e [Cu Feature Points] that are within the 'ProjectMart' Table. Why is that? and How do I solve it. 

 

I have the following new measure code:

EV TEST2 =
VAR
CurrentSP = ProjectMart[Cu Feature Points]
RETURN
COUNTROWS (
FILTER (
ALL(ProjectMart[Cu Feauture Points]),
ProjectMart[Cu Feature Points] > CurrentSP
)
)

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @stephank,

 

In addition, the formula(without defining a new measure or variable) below should also work. Smiley Happy

EV TEST2 =
COUNTROWS (
    FILTER (
        ALL ( ProjectMart[Cu Feature Points] ),
        ProjectMart[Cu Feature Points] > MAX ( ProjectMart[Cu Feature Points] )
    )
)

Note: You can replace the MAX function with any other aggregation functions(i.e. MIN or SUM), which should also work.

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Employee
Employee

Hi @stephank,

 

In addition, the formula(without defining a new measure or variable) below should also work. Smiley Happy

EV TEST2 =
COUNTROWS (
    FILTER (
        ALL ( ProjectMart[Cu Feature Points] ),
        ProjectMart[Cu Feature Points] > MAX ( ProjectMart[Cu Feature Points] )
    )
)

Note: You can replace the MAX function with any other aggregation functions(i.e. MIN or SUM), which should also work.

 

Regards

popov
Resolver III
Resolver III

Hello,

Try this formula:

 

EV TEST2 :=
VAR
CurrentSP = MAX(ProjectMart[Cu Feature Points])
RETURN
COUNTROWS (
FILTER (
ALL(ProjectMart[Cu Feauture Points]),
ProjectMart[Cu Feature Points] > CurrentSP
)
)

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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