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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
ShivGC
Helper I
Helper I

Understanding a DAX Measure

Hi Everyone, 

I wrote a DAX Measure:

Count of Unique Colleagues with Compliance Rate =

VAR
UniqueColleaguesTable =
    SUMMARIZE(
        OriginalTable,
        OriginalTable[Colleague],
        "ComplianceRate",
        [Total Compliance Rate]
    )
I first performed a summarize because the data includes colleagues name repeating many time. 
VAR FilteredTable  =

FILTER(
    UniqueColleaguesTable,
    AND([Total Compliance Rate] >= 0.5, [Total Compliance Rate] < 1)
)
I then performed a filter on the siummairzed table, to get the compliance rate for each colleague
RETURN
    COUNTROWS(FilteredTable)

I then performed a countrows to get the count of employees that are compliant or not.

Question:
I wanted to understand why the Filter formula was able to read off [Total Compliance Rate] instead of [Compliance Rate] as I had renamed the column to that in the previous variable (UniqueColleaguesTable). 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@ShivGC 

In your DAX measure, the FILTER function is able to read [Total Compliance Rate] because it is referring to the measure [Total Compliance Rate] that exists in your data model, not the column you created in the SUMMARIZE function.

When you use SUMMARIZE, you are creating a new table with a summarized view of your data, and you can add calculated columns to this table. However, these calculated columns are not directly accessible outside the context of the SUMMARIZE function. Instead, DAX continues to use the measures and columns defined in your data model.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

4 REPLIES 4
bhanu_gautam
Super User
Super User

@ShivGC 

In your DAX measure, the FILTER function is able to read [Total Compliance Rate] because it is referring to the measure [Total Compliance Rate] that exists in your data model, not the column you created in the SUMMARIZE function.

When you use SUMMARIZE, you are creating a new table with a summarized view of your data, and you can add calculated columns to this table. However, these calculated columns are not directly accessible outside the context of the SUMMARIZE function. Instead, DAX continues to use the measures and columns defined in your data model.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thank you for your response. 

May I ask what you mean by data model?

It means rest columns, measure and calculated columns in your report

 

In your DAX measure, [Total Compliance Rate] is a measure that exists in your data model. When you reference [Total Compliance Rate] in your FILTER function, DAX understands it as the measure defined in your data model, not the column you created in the SUMMARIZE function. This is why the filter works correctly.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thank you!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.