cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rimgri Member
Member

Row context measure

Hello everyone,

 

Need some help.

I have Project KPI board. Everything was fine till that point, where I had to calculate how much Bad projects are?

I think it's because Status measure I calculated is not row based.

 

 

Status = IF([CPI]>0,7; "Good";IF([CPI]>0,5; "Need attention";"Bad"))
CPI = [EV]/[Worklog]
Spoiler
EV = CALCULATE(  SUM(jira[Billabe Hours]); FILTER(jira;jira[Resolution]<>BLANK()))
Worklog = SUM(Worklog[WorklogHours])

 

 

I looked through some posts, but I couldn't get right DAX to fit.

 

Can anyone help me, this is pbix file:

https://drive.google.com/file/d/1gQyMKnEirfIYimoI1sMVfftAT0mBOWQW/view?usp=sharing

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Row context measure

HI @rimgri ,

Based on my understand, In your scenario, the CPI of Project 2 and 3 are less than 0.5, then the result will be 2.

You can use the following DAX query:

Measure =
VAR a =
    ADDCOLUMNS ( VALUES ( Component[Project] ), "CPIa", [CPI] )
RETURN
    COUNTROWS ( FILTER ( a, [CPIa] < 0.5 && Component[Project] <> BLANK () ) )

The measure you shared will not get the true data, the [CPI] is a measure, it will be calculated based on the filter, but in the measure "BAD Project", it will not have the context of Project names.

Best Regards,

Teige

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Row context measure

Hi @rimgri ,

Based on my check, I haven't found problem in your DAX query, could you please tell me what's problem did you meet?

Best Regards,

Teige

Highlighted
rimgri Member
Member

Re: Row context measure

Thanks, @TeigeGao for the replay

 

Problem is by calculating the number of BAD projects.

The measure

BAD Project = CALCULATE(DISTINCTCOUNT(Component[Project]);FILTER(Component;[CPI]<0,5))
Doesn't work it brings all projects
Community Support Team
Community Support Team

Re: Row context measure

HI @rimgri ,

Based on my understand, In your scenario, the CPI of Project 2 and 3 are less than 0.5, then the result will be 2.

You can use the following DAX query:

Measure =
VAR a =
    ADDCOLUMNS ( VALUES ( Component[Project] ), "CPIa", [CPI] )
RETURN
    COUNTROWS ( FILTER ( a, [CPIa] < 0.5 && Component[Project] <> BLANK () ) )

The measure you shared will not get the true data, the [CPI] is a measure, it will be calculated based on the filter, but in the measure "BAD Project", it will not have the context of Project names.

Best Regards,

Teige

View solution in original post

rimgri Member
Member

Re: Row context measure

Thanks, @TeigeGao it worked!

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 451 members 4,052 guests
Please welcome our newest community members: