Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone,
I am currently struggeling with an issue which seems to be a simple problem, but not simply solvable with Power BI
Lets say I have a Table "TicketInformation". The data of this table comes from a SQL-Database and is created with a power Query command.
Every ticket has a "date" field.
Then I have a second table called "Calendar" created with the DAX Function:
Solved! Go to Solution.
Hi @dominikRieder
Try a measure like this:
Amount of time spent =
VAR _timeSpent =
SUM ( 'Table'[duration] )
RETURN
IF ( ISBLANK ( _timeSpent ); 0; _timeSpent )
If in your calendar table is a date without match in your TicketInformation table, it will return 0 instead of blank. Just make sure your calendar table is resonable. E.g. a typical situation is that you have a budget table that runs until the end of the year, so the date table needs to dates until 31.12. Which means for every day from today untill 31.12, this measure will return 0, which might be undesired behaviour. You can work around this by adding a column, e.g. IsPastDates, in you calendar which is 1 when date<=today(), and filter your visual by this IsPastDates = 1.
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
Hi @dominikRieder
Try a measure like this:
Amount of time spent =
VAR _timeSpent =
SUM ( 'Table'[duration] )
RETURN
IF ( ISBLANK ( _timeSpent ); 0; _timeSpent )
If in your calendar table is a date without match in your TicketInformation table, it will return 0 instead of blank. Just make sure your calendar table is resonable. E.g. a typical situation is that you have a budget table that runs until the end of the year, so the date table needs to dates until 31.12. Which means for every day from today untill 31.12, this measure will return 0, which might be undesired behaviour. You can work around this by adding a column, e.g. IsPastDates, in you calendar which is 1 when date<=today(), and filter your visual by this IsPastDates = 1.
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
67 | |
64 | |
57 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |