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

Get 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

Reply
MarkPalmberg
Kudo Collector
Kudo Collector

Calculate columns for fiscal year aggregations

Two issues for which I'm seeking best practices. Here's my data scenario:

pledges.PNG

I'd like to:

  1. Create new columns, per PledgeID, for sum of payments by fiscal year. Does it make sense to create a new table to hold this data? Do I have to create each column (measure) separately, or is there a way to iterate through the InstallmentFY column to generate the new aggregated columns?
  2. In my table, then, I'd like to display only the fiscal year columns for the 3 years prior to and from the current date. I assume this would take the form of a Page level filter?

Thanks very much for any thoughts you may have on the matter.

 

 

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

HI @MarkPalmberg ,

 

#1, You can try to use following calculated column to achieve your requirement.

 

Sum of Current FY =
CALCULATE (
    SUM ( Table[InstallmenntAmount] ),
    FILTER (
        ALL ( Table ),
        [PledgeID] = EARLIER ( Table[PledgeID] )
            && [InstallmentFY] = EARLIER ( Table[InstallmentFY] )
    )
)

 

 

#2, I'd like to suggest you write a measure to compare current FY and today's FY and return tag. Then drag this measure to visual level filter and keep Y tag records.

 

Sample:

Tag Measure =
VAR todayFY = 'formula to convert today to FY'
VAR currFY =
    MAX ( Table[InstallmentFY] )
RETURN
    IF ( currFY <= todayFY - 3, "Y", "N" )


Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @MarkPalmberg ,

 

#1, You can try to use following calculated column to achieve your requirement.

 

Sum of Current FY =
CALCULATE (
    SUM ( Table[InstallmenntAmount] ),
    FILTER (
        ALL ( Table ),
        [PledgeID] = EARLIER ( Table[PledgeID] )
            && [InstallmentFY] = EARLIER ( Table[InstallmentFY] )
    )
)

 

 

#2, I'd like to suggest you write a measure to compare current FY and today's FY and return tag. Then drag this measure to visual level filter and keep Y tag records.

 

Sample:

Tag Measure =
VAR todayFY = 'formula to convert today to FY'
VAR currFY =
    MAX ( Table[InstallmentFY] )
RETURN
    IF ( currFY <= todayFY - 3, "Y", "N" )


Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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