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
Hello everyone,
Is there any way to force DAX to calculate a constatnt line (1) between two dates? Chart below:
My current measure:
*Measure "Test1" is added to chart as line
Every time I play around with filter context (DIM_DATE) I receive a value 1 across all dates.
Thanks for any help 🙂
Solved! Go to Solution.
HI @Filip_analyst
Please try
Test2 =
VAR date1 =
MAX ( DIM_DATE[DATE] )
VAR date2 =
DATE ( 2022, 01, 05 )
VAR date2 =
DATE ( 2022, 06, 10 )
RETURN
IF ( date1 >= date2 && date1 <= date3, 1 )
HI @Filip_analyst
Please try
Test2 =
VAR date1 =
MAX ( DIM_DATE[DATE] )
VAR date2 =
DATE ( 2022, 01, 05 )
VAR date2 =
DATE ( 2022, 06, 10 )
RETURN
IF ( date1 >= date2 && date1 <= date3, 1 )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
12 | |
9 | |
7 |
User | Count |
---|---|
38 | |
32 | |
28 | |
12 | |
11 |