Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
hello
I have a column for performed date and another column of Report date. I would like to create a measure that shows either
a. Of those performed, is the report date <30days
b. Of those performed, is the report date > 30 days
Both as percentage
Solved! Go to Solution.
Hi, @RDS2017
You can try the following methods.
Measure:
Days = DATEDIFF(Max('Table'[Performed Date]),Max('Table'[Report Date]),DAY)
Measure% =
Var _count1=CALCULATE(COUNT('Table'[Name]),FILTER(ALL('Table'),[Performed Date]<>BLANK()&&[Report Date]<>BLANK()&&[Days]>30))
Var _count2=COUNTROWS(ALL('Table'))
Return
DIVIDE(_count1,_count2)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @RDS2017
Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Name | Performed Date | Report Date |
xxx | 12/05/2023 | 08/06/2023 |
xxx | 20/05/2023 | 30/06/2023 |
xxx | 20/05/2023 | 30/06/2023 |
xxx | 20/05/2023 | 30/06/2023 |
xxx | 08/05/2023 | 30/06/2023 |
The visual should show 4/5 completed were reported on time (<30days)
Hi, @RDS2017
You can try the following methods.
Measure:
Days = DATEDIFF(Max('Table'[Performed Date]),Max('Table'[Report Date]),DAY)
Measure% =
Var _count1=CALCULATE(COUNT('Table'[Name]),FILTER(ALL('Table'),[Performed Date]<>BLANK()&&[Report Date]<>BLANK()&&[Days]>30))
Var _count2=COUNTROWS(ALL('Table'))
Return
DIVIDE(_count1,_count2)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Percentage > 30 Days =
DIVIDE(
COUNTROWS(
FILTER(
YourTableName,
NOT(ISBLANK(YourTableName[Performed Date])) &&
NOT(ISBLANK(YourTableName[Report Date])) &&
DATEDIFF(YourTableName[Performed Date], YourTableName[Report Date], DAY) > 30
)
),
COUNTROWS(YourTableName)
)
The visual shows up BLANK
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
88 | |
86 | |
83 | |
65 | |
49 |
User | Count |
---|---|
127 | |
108 | |
88 | |
70 | |
66 |