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
okusai3000
Helper IV
Helper IV

Filter Measure by another Measure (again!)

Hello everyone,

 

Sorry to repeat this kind of topic, but after searching, I still don't find a proper answer.

 

I have a FACT table of alarms for every patient. Each of them can have 1 to 3 alarms. I need to make a DISTINCT count of ONLY the patients with 2 or more Alarms.

 

I've been trying formulas like the following but I only obtain BLANK.

 

Calculate(distinctcount('fact RatiosTLM'[Id Paciente]), filter('RatiosTLM', count('fact RatiosTLM'[Id Paciente])>1)

 

Any idea?

 

Thanks a lot!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@okusai3000, Try a measure like

 

countx(filter(Summarize('fact RatiosTLM','fact RatiosTLM'[Id Paciente], "_1", count('fact RatiosTLM'[Id Paciente])),[_1]>1),[Id Paciente])

View solution in original post

3 REPLIES 3
Vera_33
Resident Rockstar
Resident Rockstar

Hi @okusai3000 

If I understand correctly

VAR T1=  GROUPBY('fact RatiosTLM','fact RatiosTLM'[Id Paciente],"@COUNT",COUNTX(CURRENTGROUP,'fact RatiosTLM'[Id Paciente]))
RETURN
COUNTROWS(FILTER(T1,[@COUNT]>1))

 

 

okusai3000
Helper IV
Helper IV

That was unbelievable FAST! Thank you so much!

amitchandak
Super User
Super User

@okusai3000, Try a measure like

 

countx(filter(Summarize('fact RatiosTLM','fact RatiosTLM'[Id Paciente], "_1", count('fact RatiosTLM'[Id Paciente])),[_1]>1),[Id Paciente])

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.