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
Anonymous
Not applicable

use CALCULATE on a Measure

Good day Everyone,

 

I am stuck and this probably is easy but I could not find a way to do it. I have a Matrix visual that has "Accounts" column, "Country" column and "Percentage" (a measure I have created).

 

I can use CALCULATE([Total Accounts],Stastics2[Country] = "India") to filter the count of accounts per country.

 

I wanted to know how I can use CALCULATE to filter the percentage column since I wanted to know the count of accounts that has positive/negative percentage.

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

Try the following two measures for Pos and Neg:

Positive Count = 
CALCULATE ( 
	[TOTAL ACCOUNTS],
	FILTER( Stastics2 , [Percentage] >= 0)
)


Negative Count = 
CALCULATE ( 
	[TOTAL ACCOUNTS],
	FILTER( Stastics2 , [Percentage] < 0)
)

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@Anonymous 

Try the following two measures for Pos and Neg:

Positive Count = 
CALCULATE ( 
	[TOTAL ACCOUNTS],
	FILTER( Stastics2 , [Percentage] >= 0)
)


Negative Count = 
CALCULATE ( 
	[TOTAL ACCOUNTS],
	FILTER( Stastics2 , [Percentage] < 0)
)

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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