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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
batranikhil
Frequent Visitor

COUNTIF on a New Measure

Hi, 

 

I'm having challenge with counting the number of rows, when a New Measure is over a certain limit. 

e.g. I have a table with multiple transactions for multiple people in terms of Amounts Deposited and Withdrawn like follows:

NameAmount DepositedAmount Withdrawn
James078
Max1000
Struss056
Phil120
James032
Max340
Struss045
Phil570
James340
Max085
Struss220
Phil022
James330
Max034
Struss880
Phil044

 

I have created a 'New Measure' in Power BI Report, to give me the 'percentage of Amount Withdrawn/Amount Deposited' for each "Name". I have been able to succesfully do that. 

 

Now I want to Count IF this new measure, 'percentage of Amount Withdrawn/Amount Deposited', is over 100%. And have one of the Visuals such as 'Card' show that on the power BI report. My report in production has over a 100k rows with over 10k unique users. 

What formula, DAX query can I use to create this new Measure? or some other workaround. 

 

Cheers,

Nikhil

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@batranikhil , Please refer these measures

 

% Withdrawn = Divide(Sum(Table[Amount Withdrawn]), Sum(Table[Amount Deposited]))

 

% GT 100 = countx(Values(Table[Name]), if([% Withdrawn] >1 , [Name], blank() ) )

Thanks Amit - worked beautifully. 

 

Can you also help with what to use if I were to build a pie chart depicting 5 groups:

above 200%, 100-200%, 76-100%, 50-75%, and less than 50%. 

Any direction would help. 

 

Cheers,

Nikhil

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.