cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ISBnLight
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
v-yalanwu-msft
Community Support
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.

vyalanwumsft_0-1634619700610.png

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.

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
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.

vyalanwumsft_0-1634619700610.png

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.

View solution in original post

amitchandak
Super User
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] ))

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
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!

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
 

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

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

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.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors