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
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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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