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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Tomast
New Member

Problem with YDT calculation, values are BLANK after calendar table was updated to include year 2023

Hello,

 

I updated the calendar table to include 2023 year. Now we are in 27/10/2023, And all the YTD calculations are showing BLANK. 

 

the link in the joins is fine, I tested going back with the calendar ending in 31/12/2022 and the calculation of YTD were fine again.

 

I'm using the quick meassure from Power BI:

 

Revenues YTD =
IF(
    ISFILTERED('Calendario'[Date]),
    ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
    TOTALYTD([Revenues IW], 'Calendario'[Date].[Date])
)
1 ACCEPTED SOLUTION
Tomast
New Member

Hello Comunity!

 

I've solved the problem, instead of using TotalYTD I've used calculate and filter the current year:

 

Revenues YTD LT =
CALCULATE(SUM('Ratios LT '[Revenues]),'Calendario'[Year]=year(today()))
 
Thanks for all the help!

View solution in original post

11 REPLIES 11
Tomast
New Member

Hello Comunity!

 

I've solved the problem, instead of using TotalYTD I've used calculate and filter the current year:

 

Revenues YTD LT =
CALCULATE(SUM('Ratios LT '[Revenues]),'Calendario'[Year]=year(today()))
 
Thanks for all the help!
v-yalanwu-msft
Community Support
Community Support

Hi, @Tomast ;

What you mean is to display blank after selecting 2023, and it is normal before selecting 2023; Can you take a screenshot to look at your data (remove sensitive information), from the formula, your dax is correct, since your date in 2023 is indeed updated, but you need to ensure that there is [Revenues IW] in 2023, if this number is not, then naturally it is also null.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Tomast
New Member

What also worked is to add an slicer with the date and select the current Year

Give this a shot.

pbinovice_0-1666882385521.png

 

I tried that too and the card do not show even a blank get crashed

**Apply this filter to the visual that uses the TOTALYTD measure.

Tomast
New Member

I marked my calendar table as date table and also took out the ".date" part of the formula but still appears as blank

Try adding a filter to the TOTALYTD function:

 

 

Revenues YTD =
IF(
    ISFILTERED('Calendario'[Date]),
    ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
    TOTALYTD([Revenues IW]'Calendario'[Date].[Date], YearColumn = YEAR(TODAY))
)

I've tried that too but is still blank. The only solution I found is to go back and use as last that of the calendar 31/12/2022. Otherwise appear the blank. But I need to add 2023 forecast

amitchandak
Super User
Super User

@Tomast . do not use .date. Mark Calendar tbale as Date table

 

TOTALYTD([Revenues IW], 'Calendario'[Date])

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

I've tried all the sugested points in your video and also taking out the .date and changing the calendar as date table and nothing worked

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.