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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
cristianml
Post Prodigy
Post Prodigy

Create generic Measure or column table for wording FY, Previous FY, etc..

Hi,

 

I need help to create a measure o column table that can give me a some wording depending of each Fiscal year. 

 

I got the Current FY if this criteria is true:

 

VAR _MTD = MAX('00_CALENDAR'[Current MTD])="MTD"
VAR _REV = SUM('Revenue - CCI'[REV MTD CFY USD])>0

 

 

cristianml_1-1646787421697.png

Then I need to put "Current" on all lines that is that current FY and put "Prior 1" for the previous one and "Prior 2" with the next one and so on.

 

I have this measure so far ..:

Current / Prior FY =
VAR _MTD = MAX('00_CALENDAR'[Current MTD])="MTD"
VAR _REV = SUM('Revenue - CCI'[REV MTD CFY USD])>0
VAR _CURRENT = IF(AND(_MTD,_REV),CALCULATE(SUM('00_CALENDAR'[Fiscal Year])),BLANK())
RETURN
IF(_MTD && _REV,MAX('00_CALENDAR'[Fiscal Year]),"--")

 

 

cristianml_0-1646786896020.png

 

So at the end I would like to have like this : 

 

cristianml_2-1646787784383.png

is possible ?

 

At least for previous FY's just to put -1, -2, etc 

 

Thanks

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @cristianml 

 

I simply restore your table data by the method shown below.

Measure:

Current/Prior FY =
IF (
    SELECTEDVALUE ( 'Date'[Fiscal year] ) = YEAR ( TODAY () ),
    "Current",
    IF (
        SELECTEDVALUE ( 'Date'[Fiscal year] ) < YEAR ( TODAY () ),
        "Prior" & "-"
            & YEAR ( TODAY () ) - SELECTEDVALUE ( 'Date'[Fiscal year] )
    )
)

vzhangti_0-1646982333667.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @cristianml 

 

I simply restore your table data by the method shown below.

Measure:

Current/Prior FY =
IF (
    SELECTEDVALUE ( 'Date'[Fiscal year] ) = YEAR ( TODAY () ),
    "Current",
    IF (
        SELECTEDVALUE ( 'Date'[Fiscal year] ) < YEAR ( TODAY () ),
        "Prior" & "-"
            & YEAR ( TODAY () ) - SELECTEDVALUE ( 'Date'[Fiscal year] )
    )
)

vzhangti_0-1646982333667.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.