Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I need help to create a measure by referring to the below table.
Measure:- If the created_at is less than or equal to 90 days (of Calendar Date) it is "TRUE" else "FALSE".
Solved! Go to Solution.
Dear @gauravnarchal .
This measure will do the work
Hi @gauravnarchal ,
According to my understanding, you want to create a True/False flag when the date is within/not within 90 days(Comparing with the last day in the Created_at column), right?
You could use the following formula:
_diff =
IF (
DATEDIFF (
SELECTEDVALUE ( 'diff'[Created_at] ),
CALCULATE ( MAX ( 'diff'[Created_at] ), ALL ( diff ) ),
DAY
) <= 90,
TRUE (),
FALSE ()
)
My visualization looks like this:
Is the result what you want? If not, please upload some data samples and expected output.
Please do mask sensitive data before uploading.
Best Regards,
Eyelyn Qin
@gauravnarchal ,
Please let me know that did you got your answer which i mentioned earlist of all .
which was
Hi @gauravnarchal ,
According to my understanding, you want to create a True/False flag when the date is within/not within 90 days(Comparing with the last day in the Created_at column), right?
You could use the following formula:
_diff =
IF (
DATEDIFF (
SELECTEDVALUE ( 'diff'[Created_at] ),
CALCULATE ( MAX ( 'diff'[Created_at] ), ALL ( diff ) ),
DAY
) <= 90,
TRUE (),
FALSE ()
)
My visualization looks like this:
Is the result what you want? If not, please upload some data samples and expected output.
Please do mask sensitive data before uploading.
Best Regards,
Eyelyn Qin
Hey @gauravnarchal ,
what exactly do you mean by "Calendar Date", do mean toda? Do you want to create a calculated column or a measure?
Do you have a dedicated Calendar table, how does this table relate to the table in your picture?
Nevertheless, based on my sample data
This DAX statement
Column =
var _today = TODAY()
var dateofthecurrentrow = [Date]
var _datediff = DATEDIFF(dateofthecurrentrow , _today , DAY)
return
IF(_datediff < 90 , "True" , "False")
Creates this calculated column:
Regards,
Tom
I would use the below measure.
_90_OrLess = IF(TODAY()-Table[Picking Date]<=90,True,False) //It will result in a boolean data type, if you need as text use IF(TODAY()-Table[Picking Date]<=90,"True","False")
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
Dear @gauravnarchal .
This measure will do the work
@gauravnarchal ,
Please let me know that did you got your answer which i mentioned earlist of all .
which was
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |