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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cillepersille
Frequent Visitor

Showing todays planned progress from cumulative data in a card

Hello!
I am working on a report that shows actual vs planned progress for a project, and I want to show todays planned progress in its own card. 
To create the planned progress curve, I have made a DAX that calculates the duration of the tasks up until their finishdate divided by the total amount of hours per day, giving me an increasing percentage per day, up until 100% on the last day of the project. These are the formulas I used:

Cumulative Duration =
CALCULATE([Tasks Total Duration],
FILTER(ALL(Tasks[FinishDate]),
Tasks[FinishDate] <= MAX(Tasks[FinishDate])
))
 
CumulativePercent = (DIVIDE([Cumulative Duration],CALCULATE(SUM(Tasks[DurationMinutes]),ALLSELECTED(Tasks[FinishDate]))))


So this formula works to show the planned progress slope day by day, but I want to show the percent planned progress for todays date in a card. I tried adding a "isToday"-and filter by but this is what happens. See the pictures below with descriptions:
A table showing CumulativePercent per day (I want the number for today, in this case for the 8th of march, being "51,98%"- this is the number I want to show in a card)

cillepersille_0-1709881187763.png

When I put on an "istoday"-filter I am getting this:

cillepersille_1-1709881420563.png

It does take all the tasks with finishdate that day and combine them, I am unable to get the "Minimum" for example of the percent. What am I doing wrong? 

Best regards,
Cecilie

 

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @cillepersille ,

Please try this measure:

CumulativePercent2 = (DIVIDE([Cumulative Duration],CALCULATE(SUM(Tasks[DurationMinutes]),ALL(Tasks[FinishDate]))))

The problem should be with the AllSELECTED() function, which retains the external filters, but at this point should ignore all filters on Tasks[FinishDate].

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 -- China Power BI User Group

View solution in original post

5 REPLIES 5
v-cgao-msft
Community Support
Community Support

Hi @cillepersille ,

Please try this measure:

CumulativePercent2 = (DIVIDE([Cumulative Duration],CALCULATE(SUM(Tasks[DurationMinutes]),ALL(Tasks[FinishDate]))))

The problem should be with the AllSELECTED() function, which retains the external filters, but at this point should ignore all filters on Tasks[FinishDate].

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 -- China Power BI User Group

Thank you so much! 

lbendlin
Super User
Super User

I tried adding a "isToday"-and filter by

please show the measure definition

isToday = IF(Tasks[finishdate]=TODAY(),1,0), filter by 1 but I am realizing this must be wrong, as it takes the finishdate.....I just want todays date from the X axis. Any idea how to achieve this?

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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