cancel
Showing results for
Did you mean:
Highlighted
Helper III

DAX for condition on a measure

Hi All,

I have a measure on which I want to check that how many person have scores more than 70%. Measure values in a table format look like as shown below.

 Deepak 1 90% Dinesh 2 40% Suresh 3 78% Irfan 4 67%

I want count 2 as answer in another measure, but my calculation is not producing correct result. Kindly help

pc_card = SUMX(Scores,IF(CALCULATE([pc_sum], 'Scores'[pc_id])>0.7 =FALSE(),0,1))

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User IV

@Minakshi , Assume name is the first column , try

countx(filter(summarize(Scores,Scores[Name], "_1",[pc_sum]),[_1] >.7),[Name])

or

SUMX(values(Scores[Name]),IF(CALCULATE([pc_sum], 'Scores'[pc_id])>0.7,1,0))

in case you need less than use <

Proud to be a Super User!

Highlighted
Resolver III

Both of them are measures.. not calculated columns...

Percent = DIVIDE( sum(StudentMarks[Marks]),500,0)
for count
Above70 = CALCULATE( COUNT(StudentMarks[Name]), FILTER(StudentMarks, [Percent]>0.7))

Note: if this gives you the solution, pls hit like button and mark as complete..

Thanks,
3 REPLIES 3
Highlighted
Super User II

Is your % calculation a calculated column or a measure?

/ J

Highlighted
Super User IV

@Minakshi , Assume name is the first column , try

countx(filter(summarize(Scores,Scores[Name], "_1",[pc_sum]),[_1] >.7),[Name])

or

SUMX(values(Scores[Name]),IF(CALCULATE([pc_sum], 'Scores'[pc_id])>0.7,1,0))

in case you need less than use <

Proud to be a Super User!

Highlighted
Resolver III

Both of them are measures.. not calculated columns...

Percent = DIVIDE( sum(StudentMarks[Marks]),500,0)
for count
Above70 = CALCULATE( COUNT(StudentMarks[Name]), FILTER(StudentMarks, [Percent]>0.7))

Note: if this gives you the solution, pls hit like button and mark as complete..

Thanks,

Announcements

Power Platform Community Conference

Check out the on demand sessions that are available now!

Microsoft Power Platform Communities

Check out the Winners!

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors