Reply
Highlighted
Member
Posts: 74
Registered: ‎12-11-2017
Accepted Solution

Percentage of 2 visuals with different dates

[ Edited ]

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 


Accepted Solutions
Moderator
Posts: 7,863
Registered: ‎03-10-2016

Re: Percentage of 2 visuals with different dates

@Guidoow1,

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

View solution in original post


All Replies
Moderator
Posts: 7,863
Registered: ‎03-10-2016

Re: Percentage of 2 visuals with different dates

@Guidoow1,

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