cancel
Showing results for
Did you mean:
Frequent Visitor

## Count the result of a measure

Hello All,

I've looked around for the solution but they seem to be taylored to the specific question asked.

I have a column that takes actual versus Target Qyts and then I create a percentage for each row (PN).

From this, i want to COUNT how many PN's (lines?) that fall into the +/- 20 of 100%, COUNT the PN's that dont, and COUNT the total.

I think if I can solve the below I can get the rest.

Below is what i have currently, but i cant COUNT a measure (Table1[Measure1])

Is there a "Standard" way to do this that I couldnt find?

20%+/- TEST =CALCULATE(COUNT(Table1[Measure1]),

FILTER(Table1, Table1[Measure1] > .8 && Table1[Measure1] <1.2))

Any help is greatly appretiated (and tanks for all the help this forum has provided in the past)

1 ACCEPTED SOLUTION
Community Support

Hi, @ISBnLight ;

You could try it,

``````COUNT = VAR _SE=SELECTCOLUMNS(FILTER(ALL('Table'),[Measure1]>0.8&&[Measure1]<1.2),"TAR",[Target],"MEA",[Measure1])
RETURN COUNTX(_SE,[MEA])``````

I made a simple count of the data on the measure, using the selectColumn () and in my data is >0.7.

if not right ,can you share simple file about it?

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 REPLIES 4
Community Support

Hi, @ISBnLight ;

You could try it,

``````COUNT = VAR _SE=SELECTCOLUMNS(FILTER(ALL('Table'),[Measure1]>0.8&&[Measure1]<1.2),"TAR",[Target],"MEA",[Measure1])
RETURN COUNTX(_SE,[MEA])``````

I made a simple count of the data on the measure, using the selectColumn () and in my data is >0.7.

if not right ,can you share simple file about it?

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User

@ISBnLight , measure work at grouping, Assume test Id is that grouping where you can test this +/- 20 %

then try like

CALCULATE(COUNTX(Filter(values(Table1[Test ID]), [Measure1] > .8 && [Measure1] <1.2) ,[Measure1] ))

Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
Frequent Visitor

Thanks amitchandak,

PREVIEW

This is looking a lot better, I'm reletivly new to DAX so need to look at where i can pull (Table1[Test ID])  as this is currently a measure, but thats work i need to put in on my time.
Thanks again for the help

Frequent Visitor

I lost most of my message somehow..

This got it a lot closer, but I'm reletivly new to DAX so am still trying to get the Table1 [TestID] part, as this ia measure in my report. BUT this is work I need to put in learning a bit more on my time.

Thanks Again amitchandak

Announcements

#### 2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.