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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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.

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] ))

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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