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

Daily percent of Yes value

Hi,


I have a worksheet containing three columns.

In the first one, I have customer numbers, on the second one there's a value Yes/No and on the third column you can see the dates when the value y/n was recorded.

 

I would like to calculate the daily percent value of those customers recorded with "yes" and present it later on the report.

 

Is there any chance to get it done using the measure? Could you please help me with that? 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the sample pbix file's link, whether it is what you are looking for.

 

Picture7.png

Customers Y Percentage =
DIVIDE (
CALCULATE ( DISTINCTCOUNT ( Data[Customer] ), Data[Value] = "y" ),
DISTINCTCOUNT ( Data[Customer] )
)
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the sample pbix file's link, whether it is what you are looking for.

 

Picture7.png

Customers Y Percentage =
DIVIDE (
CALCULATE ( DISTINCTCOUNT ( Data[Customer] ), Data[Value] = "y" ),
DISTINCTCOUNT ( Data[Customer] )
)
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


amitchandak
Super User
Super User

@Anonymous , You can create a measures like

 

percent = divide(calculate(count(Table[customer number]),filter(Table, Table[yes/No] ="Yes") ),count(Table[customer number]))

 

With date table you can also use time intelligence

 

This Day = CALCULATE([percent], FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
Last Day = CALCULATE([percent], FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))
Last Day = CALCULATE([percent], previousday('Date'[Date]))

diff =[This Day] - [Last Day]

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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