Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
Region | Date1 | Date1 % | Date2 | Date2 % |
A | 7/15/2021 | 100 | 8/1/2021 | 33.33 |
A | 7/14/2021 | 100 | 0 | |
A | 7/21/2021 | 100 | 0 | |
B | 8/1/2021 | 66.67 | 8/12/2021 | 100 |
B | 8/4/2021 | 66.67 | 8/14/2021 | 100 |
B | 0 | 8/20/2021 | 100 | |
C | 8/7/2021 | 100 | 8/1/2021 | 66.67 |
C | 8/7/2021 | 100 | 7/12/2021 | 66.67 |
C | 8/9/2021 | 100 | 0 |
Solved! Go to Solution.
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
Proud to be a Super User!
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
Proud to be a Super User!