Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi!
I'm trying to add 1 day to a date because the data (for example) shows in January but I would like it to show in February. The case is: a contract ends at 1 date and the new contract starts at a new date. Problem is: when filtering to the data I would like to show, I can only get the ending date. In most cases this is at the end of the month, for example 31-01-2025, so in the report it obviously shows up in January. I would like it to show in February, that's why I would like to add 1 day. The date column is a integer '20250131'. So I need to convert it to date with DAX + I need filters to get the specific data out.
This is one of the things that I tried:
Contracts =
CALCULATE(
DISTINCTCOUNT('FACT_Contract'[%ContractKey]),
'FACT_Contract'[VALUE] = 1.00,
'FACT_Contract'[Subject] IN { "Days" },
DATE(
DIVIDE(SELECTEDVALUE('FACT_Contract'[DATE]), 10000),
DIVIDE(MOD(SELECTEDVALUE('FACT_Contract'[DATE]), 10000), 100),
MOD(SELECTEDVALUE('FACT_Contract'[DATE]), 100)
)
)
This is the error that I'm getting: "The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column."
Converting the date in a single measure works, filtering the data to get what I need works in a single measure. But combining both doesn't work.
I'm not sure if it's even possible to do what I want. If anyone has an idea, please let me know.
Thanks in advance!
Solved! Go to Solution.
@Youri98 Convert the integer date to a date format and add one day:
DAX
ConvertedDate =
DATE(
DIVIDE(SELECTEDVALUE('FACT_Contract'[DATE]), 10000),
DIVIDE(MOD(SELECTEDVALUE('FACT_Contract'[DATE]), 10000), 100),
MOD(SELECTEDVALUE('FACT_Contract'[DATE]), 100)
) + 1
Use this new date in your calculations and filters:
DAX
Contracts =
CALCULATE(
DISTINCTCOUNT('FACT_Contract'[%ContractKey]),
'FACT_Contract'[VALUE] = 1.00,
'FACT_Contract'[Subject] IN { "Days" },
DATE(
DIVIDE(SELECTEDVALUE('FACT_Contract'[DATE]), 10000),
DIVIDE(MOD(SELECTEDVALUE('FACT_Contract'[DATE]), 10000), 100),
MOD(SELECTEDVALUE('FACT_Contract'[DATE]), 100)
) + 1
)
Proud to be a Super User! |
|
@Youri98 Convert the integer date to a date format and add one day:
DAX
ConvertedDate =
DATE(
DIVIDE(SELECTEDVALUE('FACT_Contract'[DATE]), 10000),
DIVIDE(MOD(SELECTEDVALUE('FACT_Contract'[DATE]), 10000), 100),
MOD(SELECTEDVALUE('FACT_Contract'[DATE]), 100)
) + 1
Use this new date in your calculations and filters:
DAX
Contracts =
CALCULATE(
DISTINCTCOUNT('FACT_Contract'[%ContractKey]),
'FACT_Contract'[VALUE] = 1.00,
'FACT_Contract'[Subject] IN { "Days" },
DATE(
DIVIDE(SELECTEDVALUE('FACT_Contract'[DATE]), 10000),
DIVIDE(MOD(SELECTEDVALUE('FACT_Contract'[DATE]), 10000), 100),
MOD(SELECTEDVALUE('FACT_Contract'[DATE]), 100)
) + 1
)
Proud to be a Super User! |
|
I accidently clicked 'Accept as solution' without trying so far. I need to replace the date stuff in the 2nd DAX with the ConvertedDate right?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 17 | |
| 14 | |
| 13 |