Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I've written a cumulative count measure that counts the rows up based off a column that is either blank if the task has not been closed or has a closing date in it if it has been closed. I cannot find a way to only take the cumulative count of rows where there is a date in the column and not add the row if it is blank. Additional to this, I only want the graph to start from when the first closing date is entered and stop on the graph at today's date. Currently it shows data for every date that I have in my Date Dimension table, which is flat lining the line graph out way too far.
Solved! Go to Solution.
Hi @bkoeppler ,
Please try:
CumulativePunchlistClosed =
VAR _min_date =
MIN ( 'Closed Punch Query'[Workflow - Closing Date] )
VAR _max_date =
TODAY ()
VAR CurrentDate =
MAX ( 'DimDate (REF)'[DimDate] )
RETURN
IF (
CurrentDate >= _min_date
&& CurrentDate <= _max_date,
CALCULATE (
COUNTROWS ( 'Closed Punch Query' ),
FILTER (
ALLSELECTED ( 'Closed Punch Query' ),
'Closed Punch Query'[Workflow - Closing Date] <= CurrentDate
&& NOT ISBLANK('Closed Punch Query'[Workflow - Closing Date])
)
)
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @bkoeppler ,
Please try:
CumulativePunchlistClosed =
VAR _min_date =
MIN ( 'Closed Punch Query'[Workflow - Closing Date] )
VAR _max_date =
TODAY ()
VAR CurrentDate =
MAX ( 'DimDate (REF)'[DimDate] )
RETURN
IF (
CurrentDate >= _min_date
&& CurrentDate <= _max_date,
CALCULATE (
COUNTROWS ( 'Closed Punch Query' ),
FILTER (
ALLSELECTED ( 'Closed Punch Query' ),
'Closed Punch Query'[Workflow - Closing Date] <= CurrentDate
&& NOT ISBLANK('Closed Punch Query'[Workflow - Closing Date])
)
)
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
That's Great! Thanks for your help Gao - worked perfectly.
User | Count |
---|---|
93 | |
83 | |
77 | |
73 | |
66 |
User | Count |
---|---|
115 | |
104 | |
93 | |
64 | |
61 |