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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
sdhn
Responsive Resident
Responsive Resident

DATATABLE

Hello All,

 

I am using following code in my Datatable for my report.

 

VAR CustomFiscalPeriods =
    FILTER (
        DATATABLE (
            "Fiscal YearNumber", INTEGER,
            "FirstDayOfYear", DATETIME,
            "LastDayOfYear", DATETIME,
            {
                -- IMPORTANT!!! The first day of each year must be a weekday corresponding to the definition of FirstDayOfWeek
                --              If you want to use this table, remember to set the UseCustomFiscalPeriods variable to TRUE
                --              If the IgnoreWeeklyFiscalPeriods is TRUE, there are no warnings in case the FirstDayOfWeek
                --              does not match the first day of the year
                { 2016, "2015-06-28", "2016-07-02" },
                { 2017, "2016-07-03", "2017-07-01" },
                { 2018, "2017-07-02", "2018-06-30" },
                { 2019, "2018-07-01", "2019-06-29" },                                                                                                                                                                        { 2020 , "2019-07-01", "2020-06-30" }  
            }
        ),
        UseCustomFiscalPeriods
    )
 
 
I used this scode to compare two half of FY.
I am compaing 1st half Jan to June 2019 VS 2nd Half July to December 2019.
 
But output on report displays as:
I do not want 20189 or 2020 to display, just Half of FY
----------
Half FY 2019
1
-------------
Half FY 2020
2
 
 
There is a code to disply "Half FY". I just do not want 2020 because this all 2019. Just removing year will be fine.
 
 ---------------------------------------------------------------------------
VAR FiscalGregorianPrefix = "Half FY" -- Prefix used in columns of fiscal Gregorian calendar
---------------------------------------------------
 
1 REPLY 1
sdhn
Responsive Resident
Responsive Resident

forum882019.PNG 

This is from the report. 2019 & 2020 came from the code above, anyway I can alias blank inseatd on 2019 & 2020.  thanks

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.