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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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?
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 7 | |
| 7 | |
| 6 |