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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

remove constant line from line graph

Hello,
Im stuck with a problem i dont know how to solve and why it comes up.
Srry for not knowing how to publish a picture directly in this chatbox. But as you can se in the link below i have a linechart were im geting a constant line where i shouldnt have any values.

My measure is:

Today =
CALCULATE (
COUNT ( View_Current_order_status[Order_id] );
FILTER ( ALL ( 'Today' ); 'Today'[Today_DateTime] <= MAX( 'Today'[Today_DateTime] ) ) ;FILTER( ALL ('View_Current_order_status'); 'View_Current_order_status'[Delivery_date] = TODAY()) )
 

How can i do so the line stops were there is values? i dont want the line to continue with the ranom number of 1264

https://imgur.com/a/DCkR5uQ

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

You can change your measure like so:

Today =
IF (
    MAX ( 'Idag'[Idag_DateTime] ) <= NOW (),
    CALCULATE (
        COUNT ( View_Current_order_status[Order_id] ),
        FILTER (
            ALL ( 'Today' ),
            'Today'[Today_DateTime] <= MAX ( 'Today'[Today_DateTime] )
        ),
        FILTER (
            ALL ( 'View_Current_order_status' ),
            'View_Current_order_status'[Delivery_date] = DATE ( 2019, 10, 3 )
        )
    ),
    BLANK ()
)

Best Regards,
Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Is this problem sloved?


If it is sloved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


If not, please let me know.


Best Regards
Icey

Icey
Community Support
Community Support

Hi @Anonymous ,

You can change your measure like so:

Today =
IF (
    MAX ( 'Idag'[Idag_DateTime] ) <= NOW (),
    CALCULATE (
        COUNT ( View_Current_order_status[Order_id] ),
        FILTER (
            ALL ( 'Today' ),
            'Today'[Today_DateTime] <= MAX ( 'Today'[Today_DateTime] )
        ),
        FILTER (
            ALL ( 'View_Current_order_status' ),
            'View_Current_order_status'[Delivery_date] = DATE ( 2019, 10, 3 )
        )
    ),
    BLANK ()
)

Best Regards,
Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AlB
Community Champion
Community Champion

Hi @Anonymous 

Check the current value and if it is blank, make the measure return blank. Then make sure the visual is not displaying blanks (in general it doesn't, by default)). You don't show your data model so I am not sure of the details but something like this:

Today =
IF (
    NOT ISBLANK ( Write here the code that yields the latest value, the one yopu want to check if it's Blank );
    CALCULATE (
        COUNT ( View_Current_order_status[Order_id] );
        FILTER (
            ALL ( 'Today' );
            'Today'[Today_DateTime] <= MAX ( 'Today'[Today_DateTime] )
        );
        FILTER (
            ALL ( 'View_Current_order_status' );
            'View_Current_order_status'[Delivery_date] = TODAY ()
        )
    )
)
 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

Anonymous
Not applicable

@AlB 
i created table "Today" in advanced editor with the code below:

let
Start = Date.AddDays(Date.StartOfDay(DateTime.LocalNow()),-1),
End = Date.AddDays(Start,2),
Count = Number.From(End-Start)*1440,
Calendar = Table.FromColumns({List.DateTimes(Start,Count,#duration(0,0,1,0))}, type table[DateTime=datetime]),
#"renamed columns" = Table.RenameColumns(Calendar,{{"DateTime", "Today_DateTime"}})
in
#"renamed columns"

To get every minute in todays date.

below is a link to google drive on how my tables look like, each file is a table
https://drive.google.com/drive/folders/1rCp-_LXvImGqnPW0Y92b1TMWdPt8XE-_?usp=sharing


Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.