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.
Hi,
I need to obtain the following number as a measure for me to do some additional calculations: number of days between today and a specific date within the data set.
I have added a calculated column in my date calendar to get the time difference in days between today and all the available days. Then I made another column with a marker for the date I have to take into account (not the first or last date of the dataset, so I can't use MIN or MAX as a get around).
I can make a card with this as long as I use an additional filter to the visual (filter set on the 2nd column I mentioned). To get the same number as a measure, I thought I could use the following filter:
The error message I get doesn't make sense as of now.
How can I get around this?
Thanks,
Pauline.
Solved! Go to Solution.
@johnt75 I tried this just now but it doesn't seem to work.
However, I did find the solution just now as well. It is way easier than all I could think of 😄
@johnt75 I tried this just now but it doesn't seem to work.
However, I did find the solution just now as well. It is way easier than all I could think of 😄
I think you could use
# of days =
VAR startDate =
CALCULATE ( SELECTEDVALUE ( 'Date'[Date] ), 'Date'[Start date] = "Start date" )
RETURN
DATEDIFF ( startDate, TODAY (), DAY )
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 |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |