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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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