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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. 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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Kudoed Authors