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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Ten
New Member

Monthly Trend is picking incorrect value for last month

My last month should be 5M but it is picking up 1.8M (all other motnhs are correct values).

Total is picking up correctly in another visual with same metrics.

I'm questioning if something is off in my Date structure for April.

 

Ten_0-1659019322332.png

 

1 ACCEPTED SOLUTION
Ten
New Member

Here is full example. April is correct in total but when broken out by fiscal year FY 2022 is off.

 

Ten_0-1659020711938.png

FiscalYear =
IF(AND(StandardDate[Year]=2015,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2015,StandardDate[MonthNo]>4),"FY2015-2016",
IF(AND(StandardDate[Year]=2016,StandardDate[MonthNo]<=04),"FY2015-2016",
IF(AND(StandardDate[Year]=2016,StandardDate[MonthNo]<=12 && AND(StandardDate[Year]=2016,StandardDate[MonthNo]>4)),"FY2016-2017",
IF(AND(StandardDate[Year]=2017,StandardDate[MonthNo]<=04),"FY2016-2017",
IF(AND(StandardDate[Year]=2017,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2017,StandardDate[MonthNo]>4),"FY2017-2018",
IF(AND(StandardDate[Year]=2018,StandardDate[MonthNo]<=04),"FY2017-2018",
IF(AND(StandardDate[Year]=2018,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2018,StandardDate[MonthNo]>4),"FY2018-2019",
IF(AND(StandardDate[Year]=2019,StandardDate[MonthNo]<=04),"FY 2018-2019",
IF(AND(StandardDate[Year]=2019,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2019,StandardDate[MonthNo]>4),"FY 2019-2020",
IF(AND(StandardDate[Year]=2020,StandardDate[MonthNo]<=04),"FY 2019-2020",
IF(AND(StandardDate[Year]=2020,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2020,StandardDate[MonthNo]>4),"FY 2020-2021",
IF(AND(StandardDate[Year]=2021,StandardDate[MonthNo]<=04),"FY 2020-2021",
IF(AND(StandardDate[Year]=2021,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2021,StandardDate[MonthNo]>4),"FY 2021-2022",
IF(AND(StandardDate[Year]=2022,StandardDate[MonthNo]<=04),"FY 2021-2022"))))))))))))))

View solution in original post

1 REPLY 1
Ten
New Member

Here is full example. April is correct in total but when broken out by fiscal year FY 2022 is off.

 

Ten_0-1659020711938.png

FiscalYear =
IF(AND(StandardDate[Year]=2015,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2015,StandardDate[MonthNo]>4),"FY2015-2016",
IF(AND(StandardDate[Year]=2016,StandardDate[MonthNo]<=04),"FY2015-2016",
IF(AND(StandardDate[Year]=2016,StandardDate[MonthNo]<=12 && AND(StandardDate[Year]=2016,StandardDate[MonthNo]>4)),"FY2016-2017",
IF(AND(StandardDate[Year]=2017,StandardDate[MonthNo]<=04),"FY2016-2017",
IF(AND(StandardDate[Year]=2017,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2017,StandardDate[MonthNo]>4),"FY2017-2018",
IF(AND(StandardDate[Year]=2018,StandardDate[MonthNo]<=04),"FY2017-2018",
IF(AND(StandardDate[Year]=2018,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2018,StandardDate[MonthNo]>4),"FY2018-2019",
IF(AND(StandardDate[Year]=2019,StandardDate[MonthNo]<=04),"FY 2018-2019",
IF(AND(StandardDate[Year]=2019,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2019,StandardDate[MonthNo]>4),"FY 2019-2020",
IF(AND(StandardDate[Year]=2020,StandardDate[MonthNo]<=04),"FY 2019-2020",
IF(AND(StandardDate[Year]=2020,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2020,StandardDate[MonthNo]>4),"FY 2020-2021",
IF(AND(StandardDate[Year]=2021,StandardDate[MonthNo]<=04),"FY 2020-2021",
IF(AND(StandardDate[Year]=2021,StandardDate[MonthNo]<=12) && AND(StandardDate[Year]=2021,StandardDate[MonthNo]>4),"FY 2021-2022",
IF(AND(StandardDate[Year]=2022,StandardDate[MonthNo]<=04),"FY 2021-2022"))))))))))))))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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