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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Veljanov
New Member

Calculate measure that returns the same as a visual

I've a dataset similar to the one below. What I want to do is to create a mesure to calculate the number of projects that have more than 40% of it's rows as certified. 

 

I can accomplish this by making a mesure somthing like:

= CALCULATE ( COUNTROWS ( Data ), Data[Status] = "Certifierad" )/Countrows(Data)) and then putting my mesure and the Project column in 100% bar chart to see what projects have more than 40% certified rows. How to I do this in a mesure that returns the number of projects that I can use in a card visual?

Veljanov_0-1648901417808.png

Any help would be appricated! 😊😊

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Veljanov So typically something like:

Measure =
  VAR __Table = SUMMARIZE('Table',[Projects],"Percent",[Your measure])
RETURN
  COUNTROWS(FILTER(__Table,[Percent] > .4))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Veljanov
New Member

Learned something new, thank you! 👍

Greg_Deckler
Super User
Super User

@Veljanov So typically something like:

Measure =
  VAR __Table = SUMMARIZE('Table',[Projects],"Percent",[Your measure])
RETURN
  COUNTROWS(FILTER(__Table,[Percent] > .4))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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