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

date % calculations

Hi,

 

My data is below and need to calcualte % calculations based on dates and region.

I need to calculate Date1 % and Date2 %.

 

Based on region,

if date1 filled with all dates, then date1 % should be 100%.

If one date is filled then date1% should be 33.33%. 

If two dates are filled, then date1% should be 66.67

 

RegionDate1Date1 %Date2Date2 %
A7/15/20211008/1/202133.33
A7/14/2021100 0
A7/21/2021100 0
B8/1/202166.678/12/2021100
B8/4/202166.678/14/2021100
B 08/20/2021100
C8/7/20211008/1/202166.67
C8/7/20211007/12/202166.67
C8/9/2021100 0
1 ACCEPTED SOLUTION
FarhanAhmed
Community Champion
Community Champion

Try Below

Set this measure format as the percentage

Create  similar for other date as well

 

Date 1 % = 
Var d = CALCULATE(COUNT('Table'[Region]),ALLEXCEPT('Table','Table'[Region]))
Var e =  CALCULATE(COUNTBLANK('Table'[Date1]),ALLEXCEPT('Table','Table'[Region]))
RETURN
(d-e)/d

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
FarhanAhmed
Community Champion
Community Champion

Try Below

Set this measure format as the percentage

Create  similar for other date as well

 

Date 1 % = 
Var d = CALCULATE(COUNT('Table'[Region]),ALLEXCEPT('Table','Table'[Region]))
Var e =  CALCULATE(COUNTBLANK('Table'[Date1]),ALLEXCEPT('Table','Table'[Region]))
RETURN
(d-e)/d

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Anonymous
Not applicable

Thank you @FarhanAhmed . You are awesome.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.