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
Anonymous
Not applicable

Create scorecards by linking statues to date

Dear all
I have two reports; 
- One with dates (Start date and completion date)

- the other with completion statues (Complete and Not Complete)

The two tables don't have any relation, but I want to create scorecards that show the number of people who have completed a certain program and the other that shows the number who did not complete. The cells in the completion date column that are empty or in the future  are "Not Complete", while those that have dates in them that are in the past are "Complete"
Below is a sample of the excel files
Thanks in advance

https://drive.google.com/drive/folders/1W8H-9CCp-D9T6i3VRRUr0n_Jh51-JD2I?usp=sharing

 

1 ACCEPTED SOLUTION
Thejeswar
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

You can create a new column in the Data set where you dates using the below DAX as  a calculated column

 

Status = 
VAR LatestStatus = IF(Dates[Completion Date] >= TODAY() || Dates[Completion Date] == BLANK(), "Not Completed", "Completed")
return
LatestStatus

 

Use the New Status column in both the Axis

In one axis as a category and in the other with a count. You should get a sorecard. PFB image for the same

 

scorecard.PNG

View solution in original post

5 REPLIES 5
Sumanth_23
Memorable Member
Memorable Member

hi @Anonymous - The approach explained by @Thejeswar would be the way to go if your data is setup as per the files shared. And yes, you will have to keep updating the calculated column with the new logic and the corresponding statuses if there are additional statuses required. 

Another approach would be to capture the status flag (1, 2, 3, etc.) along with the dates and maintain a DIMENSION table for Status code and corresponding Status description - and lookup each of the Start and End date combinations to derive the status from the DIMENSION table. 

 

Do vote/mark this post as a solution and provide kudos if it helped you with your question. This would also help others on the community who may have similar questions. Thanks! 

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

Proud to be a Super User!



Thejeswar
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

You can create a new column in the Data set where you dates using the below DAX as  a calculated column

 

Status = 
VAR LatestStatus = IF(Dates[Completion Date] >= TODAY() || Dates[Completion Date] == BLANK(), "Not Completed", "Completed")
return
LatestStatus

 

Use the New Status column in both the Axis

In one axis as a category and in the other with a count. You should get a sorecard. PFB image for the same

 

scorecard.PNG

Anonymous
Not applicable

@Thejeswar first of, thank you for your response. If the status increase in the future say from 2 to 30 for example "Complete" "Not completed" "Pending" "Suspended" "Abandoned" ... and so on do I have to manually type all the 30 words into the DAX code? 
I did not see you use the status table

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

I am not sure whether I understood your file correctly, but when I opened your excel file, I saw one line that showed start date = 6/19/2017 and completion date = 3/27/2013

Please check and please help me to understand more about your data.

Thank you.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Anonymous
Not applicable

@Jihwan_Kim that was an error. I u can randomly generate any date. The completion date must be after the start date
Thanks

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.