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
Clint
Helper V
Helper V

Creating dynamic groupings based on dates

Hello,

 

I have a report that pulls data from Project Server On-line. I have created a custom field in Project Server called "FeatureTargetComoplete".  One of the measures we report is a quarterly report of features that hit/missed their FC date each quarter.  What I've done to facilitate showing this correctly in a line chart is create a group for the FeatureTargetComplete field and manually added all of the returned dates into groups based on the quarter they fall in.... We use custom quarter names such as DQ18 (Oct18-Dec18)MQ19 (Jan19-Mar19) etc.....  This works however, what I'd like to do is be able to have new FC dates that fall in these quarters automatically get added to the right quarter.  Otherwise, FC dates for new projects won't be added to these groups unless I add them manually.  I'm pretty sure there are many better ways to skin this cat but I'm not sure what they might be.  any insights are appreciated.

1 ACCEPTED SOLUTION

Hi @Clint 

I would suggest you to create calcuated columns.

First go to Edit queries->Add column->add year, quarter, day

Then close&apply, create a calcuated column, then add this column as the Axis value instead.

Column =
VAR NEW_QUARTER =
    SWITCH ( [Quarter], 1, "2.MQ", 2, "3.JQ", 3, "4.SQ", 4, "1.DQ" )
VAR YEAR =
    RIGHT ( [Year], 2 )
RETURN
    CONCATENATE ( NEW_QUARTER, YEAR )

12.png

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @Clint

It's not clear for me.

Could you show some data examples?

 

Best Regards

Maggie

Hi Maggie,

 

Sure.  In any given quarter we'll have a range of projects that have Feature Complete dates in that quarter.fc table of dates.PNG

The FC Baseline field is actually a column called Featuretargetcomplete in the Projects table from Project Server.  I created a group on that field and grouped the dates in groups called 1.DQ18, 2.MQ19, 3.JQ19,  This allowed me to create a chart that looks like this:
FC KPO Chart.PNG

The problem is, when I grouped the dates into quarters, I could only group dates for the current projects.  So, if/when new projects come in (or dates change), the groups will not adjust dynamically to reflect these changes.  How do I create groups that automatically group dates into the right quarters?

 

Hi @Clint 

I would suggest you to create calcuated columns.

First go to Edit queries->Add column->add year, quarter, day

Then close&apply, create a calcuated column, then add this column as the Axis value instead.

Column =
VAR NEW_QUARTER =
    SWITCH ( [Quarter], 1, "2.MQ", 2, "3.JQ", 3, "4.SQ", 4, "1.DQ" )
VAR YEAR =
    RIGHT ( [Year], 2 )
RETURN
    CONCATENATE ( NEW_QUARTER, YEAR )

12.png

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Maggie!! I will give this a shot.

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.