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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

dates from date table incomplete on visuals

Hello,

 

I'm a beginner with date tables and I face an issue with it when introducing inside a visual.

 

I want to display in a bar chart a measure that cumulate the Power value of power plants through years (including the years to come).

The values have to be take into account only when the year on the axis is superior to the comissionning date and inferior to the dismantling date.

Here is the measure's code : 

PuissanceCumuléeTot =
CALCULATE(
    SUM(descriptionActifsInfos[Ptotale])/1000,
    FILTER(
        'descriptionActifsInfos',
        'descriptionActifsInfos'[StartDate].[Year] <= YEAR(MAX(Dates[Date])) &&
        OR(ISBLANK(MIN(descriptionActifsInfos[EndDate])), 'descriptionActifsInfos'[EndDate].[Year] >= YEAR(MIN(Dates[Date])))
    )
)

It is working well but the years after 2021 are not displayed and I don't undestand why..

 

If someone could help me with that I'd be glad to listen your advice !

 

Thank in advance.

Cado

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

But I think the approach in blog with two dates will help you

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

Anonymous
Not applicable

Hi @amitchandak ,

 

it looks the button to attach a file is missing and the drag and drop says that csv or xlsx files are not supported. 

By reading your article I suspect the explanation could come from the relation between the date table and the other tables because I have none.

In image, this is the expected result :

Cado_0-1621345953173.png

 

And this is what I got when putting the year field of the date table in the axis :

Cado_1-1621346019679.png

As you can see 2022 2023 2024 are missing altough the date table ends in 2031.

There is no filter applied except the ones in the measure

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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