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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Sab
Helper V
Helper V

Measure not working when using in table with other columns

Hello, 

I have a column: SCORE with values 1, 2, ..., 10.

 

Then I have 3 measures: 

Detractors = CALCULATE(COUNT('Responses Database'[SCORE]),'Responses Database'[SCORE]<7)
Promoters = CALCULATE(COUNT('Responses Database'[SCORE]),'Responses Database'[SCORE]>8)
NPS = ([Promoters]-[Detractors])/[All Rows]*100
 
The calculation is OK and I can use the measure as Card or when I use it in table with Quarters from DateTable,
but when I use it in table with other columns from same table where SCORE column is, it doesn't work:
 
New Message - Microsoft Power BI Community - Microsoft Edge.jpg
 
Please advise.
 
Thanks
Sab
 
1 ACCEPTED SOLUTION

The score column is the one that has values that create the measure.

 

So the column date is in relationship with Date Table, no problem with Quarters, months etc. 

 

But the problem is when I put in the table visual along with for example Company column.

 

I tried your solution, but the values get too low

View solution in original post

6 REPLIES 6
v-eachen-msft
Community Support
Community Support

Hi @Sab ,

 

Would you like to provide some sample data? The information you give is limited, I can't get the context of the table.

And you can try this measure:

NPS =
 ( [Promoters] - [Detractors] )
    / CALCULATE (
        COUNTROWS ( 'Responses Database' ),
        ALLEXCEPT (
            'Responses Database',
            'Responses Database'[Campany],
            'Responses Database'[Quarter]
        )
    ) * 100

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

NPS - Power BI Desktop.jpg

The score column is the one that has values that create the measure.

 

So the column date is in relationship with Date Table, no problem with Quarters, months etc. 

 

But the problem is when I put in the table visual along with for example Company column.

 

I tried your solution, but the values get too low

There was no problem in measures, just the dummy data created that illusion...

 

Thanks all who took time to look at this.

Aron_Moore
Solution Specialist
Solution Specialist

Keep in mind tables will apply a "filter" context to your measure unless you explicitly tell it not to with a function like ALL().

Can you please be more specific?

 

thanks

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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