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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.