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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Niiru1
Helper V
Helper V

Divide measure by distinct count

I currently have a measure for a pareto chart:

 

Cumul Events =
VAR thisdate =
MAX ( 'Enhanced line list'[Event Date] )
RETURN
CALCULATE (
[Count],
ALL ( 'Enhanced line list'[Event Date] ),
'Enhanced line list'[Event Date] <= thisdate
)
 

however I was hoping to get this in % form i.e. rather than a range of 1-1200 for example is it possible to get this as a 0-100% range?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Niiru1 , Try like

 Cumul Events =
VAR thisdate =
MAX ( 'Enhanced line list'[Event Date] )
RETURN
divide( 
	CALCULATE (
	[Count],
	ALL ( 'Enhanced line list'[Event Date] ),
	'Enhanced line list'[Event Date] <= thisdate
	) ,
	CALCULATE (
	[Count],
	ALL ( 'Enhanced line list'[Event Date] )
	)
)

or

 Cumul Events =
VAR thisdate =
MAX ( 'Enhanced line list'[Event Date] )
RETURN
divide( 
	CALCULATE (
	[Count],
	ALL ( 'Enhanced line list'),
	'Enhanced line list'[Event Date] <= thisdate
	) ,
	CALCULATE (
	[Count],
	ALL ( 'Enhanced line list' )
	)
)

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Niiru1 , Try like

 Cumul Events =
VAR thisdate =
MAX ( 'Enhanced line list'[Event Date] )
RETURN
divide( 
	CALCULATE (
	[Count],
	ALL ( 'Enhanced line list'[Event Date] ),
	'Enhanced line list'[Event Date] <= thisdate
	) ,
	CALCULATE (
	[Count],
	ALL ( 'Enhanced line list'[Event Date] )
	)
)

or

 Cumul Events =
VAR thisdate =
MAX ( 'Enhanced line list'[Event Date] )
RETURN
divide( 
	CALCULATE (
	[Count],
	ALL ( 'Enhanced line list'),
	'Enhanced line list'[Event Date] <= thisdate
	) ,
	CALCULATE (
	[Count],
	ALL ( 'Enhanced line list' )
	)
)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors