The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
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
Solved! Go to Solution.
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.
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
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.
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
@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
User | Count |
---|---|
78 | |
73 | |
38 | |
30 | |
28 |
User | Count |
---|---|
107 | |
100 | |
55 | |
49 | |
45 |