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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Percentage of 2 visuals with different dates

I would like to create a percentage from 2 count card visuals.

 

Visual 1= 

Oppertunities that are created in 2018 

 

Visual 2=

Oppertunities that are modified to won in 2018

 

I made a sample of the data:

Created on 

Outlet

Modified ByStatus
12-8-2016A13-2-2017won
21-3-2017B12-1-2018open
6-7-2017C31-1-2018won
12-12-2017D21-8-2017open
13-1-2018E13-1-2018won
21-1-2018F21-1-2018open
1-2-2018G1-2-2018open
15-2-2018H1-3-2018won
24-2-2018I24-2-2018open
4-3-2018J4-3-2018open


And Visual 2 would display: 3
In this case Visual 1 would display: 6

 

I want to create a visual that shows the percentage of won oppertunities compared to created oppertunities.

So in this case it would be 50%

The visuals are about the current year and I want them to change automatically in 2019

 

The problem I encounter is that the relationship with my calender table is with 'Created on', However visual 2 works with 'Modified by'

 

I tried te following formula:

CALCULATE(COUNT('Table 1'[Outlet]);'Table 1'[Status]="Won";'Table 1'[Modified by]=YEAR(TODAY())) / CALCULATE(COUNT('Table 1'[Outlet]);'Table 1'[Created on]=YEAR(TODAY()))

However this turns out (BLANK)

 

I hope someone can help me with this!

 

Regards,

Guido 

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@Anonymous,

Change your DAX to the following:

Measure = CALCULATE(COUNT('Table 1'[Outlet]);'Table 1'[Status]="Won";YEAR('Table 1'[Modified by])=YEAR(TODAY()))/CALCULATE(COUNT('Table 1'[Outlet]);YEAR('Table 1'[Created on])=YEAR(TODAY()))

1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuezhe-msft
Employee
Employee

@Anonymous,

Change your DAX to the following:

Measure = CALCULATE(COUNT('Table 1'[Outlet]);'Table 1'[Status]="Won";YEAR('Table 1'[Modified by])=YEAR(TODAY()))/CALCULATE(COUNT('Table 1'[Outlet]);YEAR('Table 1'[Created on])=YEAR(TODAY()))

1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.