March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, I'm quite the PowerBI amateur but I was trying to create a measure that does the following.
I want to display the current weeks reporting week when the effective from date is greater than or equal to todays date, and the effective to date is less than or equal to todays date.
I have created the following measure
Current Reporting Week =
IF (
VALUES ( recco_mscreportingweek[recco_effectivefrom] ) >= TODAY ()
&& VALUES ( recco_mscreportingweek[recco_effectiveto] ) <= TODAY (),
true,
false
)
But what I want to do is return the reporting week column if the statement above is true.
A measure may not be the way to go, so any help at all will be appreciated.
Thank you.
Solved! Go to Solution.
@RavChop , you can have a column like
Current Reporting Week =
IF (
( recco_mscreportingweek[recco_effectivefrom] ) >= TODAY ()
&& ( recco_mscreportingweek[recco_effectiveto] ) <= TODAY (),
recco_mscreportingweek[reporting week],
blank()
)
or create a measure
Current Reporting Week =
countrows(Filter(recco_mscreportingweek, IF (
VALUES ( recco_mscreportingweek[recco_effectivefrom] ) >= TODAY ()
&& VALUES ( recco_mscreportingweek[recco_effectiveto] ) <= TODAY (),
true(),
false()
)))
use with reporting week
@RavChop , you can have a column like
Current Reporting Week =
IF (
( recco_mscreportingweek[recco_effectivefrom] ) >= TODAY ()
&& ( recco_mscreportingweek[recco_effectiveto] ) <= TODAY (),
recco_mscreportingweek[reporting week],
blank()
)
or create a measure
Current Reporting Week =
countrows(Filter(recco_mscreportingweek, IF (
VALUES ( recco_mscreportingweek[recco_effectivefrom] ) >= TODAY ()
&& VALUES ( recco_mscreportingweek[recco_effectiveto] ) <= TODAY (),
true(),
false()
)))
use with reporting week
I tried creating a column, however, when I try to use that column in a visual there seems to be no data. I have checked to ensure I have date that falls between the date range of effective from and effective to, but the visual is still blank.
Apologies, I realise my condition was wrong and needed to swap around the >=, this has worked really well, thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |