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
ACN
Regular Visitor

Cumulative line get some periods in blank

Hi everyone,

 

Im trying to get cumulatives in a line chart in power bi but i get some periods in blank, i dont know how to fix this,

 

Here is de dax sintaxis:

 

Cuml =
IF(
    MAX('Forecast Qty'[DateOriginal])<=CALCULATE(MAX('Actuals'[DateOriginal]), ALL('Date')),
    BLANK(),
        Calculate([Forecast Qty FoC]+[Act Qty_cuml],
        FILTER (
            ALL('Date'),
            'Date'[DateOriginal] <= MAX ('Date'[DateOriginal])
        )
    )
)Cumulative Line Breaks.PNG
 
Regards!
2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Ensure that there is a relationship (Many to One and Single) from the DateOriginal column of both our FACT tables to the DateOriginal column of your Date table.  In the Date table, create calculated column formulas for year, Month name and Month number.  Ensure that the Month name column is sorted by the Month number column.  To your visual, drag Year and Month name from the Date table.  Write this measure

Cuml = Calculate([Forecast Qty FoC]+[Act Qty_cuml],datesbetween('Date'[DateOriginal],minx(all('Date'),'Date'[DateOriginal]),max('Date'[DateOriginal])))
Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. I cannot help you without usable sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. I cannot use screenshots of your source data.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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